Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support plain timestamp type (oid 1114) #151

Open
kayhide opened this issue Oct 13, 2020 · 1 comment
Open

Support plain timestamp type (oid 1114) #151

kayhide opened this issue Oct 13, 2020 · 1 comment

Comments

@kayhide
Copy link

kayhide commented Oct 13, 2020

Support plain timestamp type (timestamp without timezone) which is mapped to oid of 1114.

Currently it has timestampType and is mapped to oid 1184 as:

-- | OIDs for all types used by Selda.
blobType, boolType, intType, int32Type, int16Type, textType, doubleType,
dateType, timeType, timestampType, nameType, varcharType, uuidType,
jsonbType :: Oid
boolType = Oid 16
intType = Oid 20
int32Type = Oid 23
int16Type = Oid 21
textType = Oid 25
nameType = Oid 19
doubleType = Oid 701
dateType = Oid 1082
timeType = Oid 1266
timestampType = Oid 1184
blobType = Oid 17
varcharType = Oid 1043
uuidType = Oid 2950
jsonbType = Oid 3802

Plain timestamp type is necessary when reading a table which is created by some other library/framework.

@kayhide
Copy link
Author

kayhide commented Oct 13, 2020

On our application, we make all timestamps to be saved in utc and use only oid 1114.
In such a case, just replacing the 1184 with 1114 works.

But of course, it is not a good solution as a library...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant