You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible for the Money DataType to be added? If not, does anyone have any tips on how to do this? I tried creating a formatter myself but with no luck.
Thanks.
The text was updated successfully, but these errors were encountered:
Hi @JoLinWG thanks for your interest in pgcopy! There really ought to be some documentation on adding new datatypes. It looks like money datatype is handled by the cash* functions in the postgresql codebase. Specifically, cash_recv seems to be deserializing a 64-bit integer. This datatype may be somewhat tricky, since it apparently is locale-dependent, but if you want to have a hand at it, I would start by doing a binary dump of a money value and see what it looks like, then try to figure out how lc_monetary factors in. If the import format is meant to look like an int, but the significance is locale-specific, my hunch is the best way to import would be to prepare the input data as integers in a way that reflects the locale setting. Perhaps in this case 'money' could be implemented the same way as 'int8'.
Is it possible for the Money DataType to be added? If not, does anyone have any tips on how to do this? I tried creating a formatter myself but with no luck.
Thanks.
The text was updated successfully, but these errors were encountered: