=?iso-8859-1?Q?Hans=2DJ=FCrgen=20Sch=F6nig?= <[EMAIL PROTECTED]> writes:
> Surprisingly "-" is defined for (date, date).

What's surprising about that?  It yields an integer number of days
between the dates:

regression=# select '2001-06-12'::date - '2000-06-12'::date;
 ?column?
----------
      365
(1 row)

> performance=# SELECT timestamp('2001-06-12'::date - '2000-06-12'::date);

>        timestamp
> ------------------------
>  1970-01-01 01:06:05+01
> (1 row)

timestamp(integer) converts a Unix timestamp value (seconds since 1970)
into a timestamp.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly

Reply via email to