9

I have a column that requires a timestamp with time zone but I cannot use a built in pgSQL function nor can I modify the column to accept null dates. How can I insert a string date in the right format manually that represents no time?

1 Answer 1

8

There is no empty timestamp other than null, but you can use one of the special date/time values infinity or -infinity.

select 'infinity'::timestamp, '-infinity'::timestamp

 timestamp | timestamp 
-----------+-----------
 infinity  | -infinity
(1 row)

See Table 8.13. Special Date/Time Inputs.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.