Search Postgresql Archives

timestamptz & 'infinity' & date

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am getting a little confused in casting 'infinity'.

It seems that 'infinity' still can't be casted to a date. :-(

But I tried the following casts, but I am not sure the results are consistent.

instrumentation=> SELECT 'infinity'::date;
ERROR:  invalid input syntax for type date: "infinity"


instrumentation=> SELECT 'infinity'::timestamptz;
 timestamptz
-------------
 infinity
(1 row)

instrumentation=> SELECT 'infinity'::timestamptz::date;
 date
------
      <-- this blank I determine was a NULL.
(1 row)


Is this correct?  Shouldn't it also return an error?

Regards,
Richard Broersma Jr.

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux