-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Not sure if this is by design, but I have noticed that values returned by json_build_object
are not being processed by setTypeParser
function. Even if I specify in the query of what type the value will be, it is still ignored.
Example: having this set pg.types.setTypeParser(1114, (val) => val === null ? null : moment(val));
and running same query with only difference of how values are selected will return different results.
SELECT time_column FROM test_table
time_column
is instance of moment
SELECT json_build_object('time_column', time_column) FROM test_table
time_column
is a string with date coming straight from database
Is this a bug or it is expected behavior?
Running 7.5.0 version.
ondrej-111, masonjwhite and tapz
Metadata
Metadata
Assignees
Labels
No labels