Search Postgresql Archives

Re: Conversion to 8.3

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

 



"Scott Marlowe" <scott.marlowe@xxxxxxxxx> writes:
> what type is new.ontime ??   timestamp or interval.  I would expect it
> to be an interval.  But intervals are either negative or positive, not
> "ago" unless that's something peculiar to 7.4 that I've long since
> forgotten.

No, it's still around:

regression=# select '-1 day'::interval;
 interval 
----------
 -1 days
(1 row)

regression=# set datestyle = postgres;
SET
regression=# select '-1 day'::interval;
  interval   
-------------
 @ 1 day ago
(1 row)

The most bletcherous aspect of Terry's original coding is that it fails
entirely, and silently, if the DateStyle setting isn't what it's
assuming...

			regards, tom lane


[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