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
{{ message }}
Repository navigation
infinity value in Postgres timestamp column returns as 'Invalid Date' #728
I have a table with a column dat has a date field with a default value of infinity.
CREATETABLEtest (
id integerNOT NULL GENERATED ALWAYS AS IDENTITY,
expires timestamp with time zone DEFAULT 'infinity'NOT NULL,
PRIMARY KEY (id),
);
This works fine within postgres and within query logic, e.g. ... WHERE end_date is > now() to select all rows that are not yet expired. But Postgres.js converts the infinity values to a Date, resulting in an 'Invalid Date' object in javascript.
Shouldn't this be converted to JavaScripts'Infinity? Should i make a custom type (but I need to replicate the existing date conversion somehow too)? How would I approach this?
Reacted by Žiga Leber, Tobias Schönberg, AndLut, Walter and Allen Lantz
Activity
BeeFox-sys commentedon Feb 18, 2024
I am also having this issue
v4