From: | "Ricardo Perez Lopez" <ricpelo(at)hotmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Cc: | tgl(at)sss(dot)pgh(dot)pa(dot)us |
Subject: | Re: '1 year' = '360 days' ???? |
Date: | 2004-10-24 10:09:33 |
Message-ID: | BAY15-F12rf3yXvEbjk0000f8f3@hotmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
>From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
>To: "Ricardo Perez Lopez" <ricpelo(at)hotmail(dot)com>
>CC: pgsql-general(at)postgresql(dot)org
>Subject: Re: [GENERAL] '1 year' = '360 days' ???? Date: Sat, 23 Oct 2004
>19:52:50 -0400
>
>"Ricardo Perez Lopez" <ricpelo(at)hotmail(dot)com> writes:
> > I have observed that, for PostgreSQL, one year is actually 360 days:
>
> > SELECT '1 year'::timestamp = '360 days'::timestamp;
>
> > ?column?
> > -------------
> > t
>
>Nonsense.
>
>regression=# SELECT '1 year'::timestamp = '360 days'::timestamp;
>ERROR: invalid input syntax for type timestamp: "1 year"
>
>How about telling us what you *really* did, instead of posting faked
>examples?
Sorry: it's an errata. The query is, actually:
SELECT '1 year'::interval = '360 days'::interval;
Sorry about the inconvenience.
>There are some contexts in which an interval (not a timestamp) of 1
>month will be taken as equivalent to 30 days, for lack of any better
>idea, but it's not the case that Postgres doesn't know the difference.
>
> regards, tom lane
Thanks.
_________________________________________________________________
Acepta el reto MSN Premium: Protección para tus hijos en internet.
Descárgalo y pruébalo 2 meses gratis.
http://join.msn.com?XAPID=1697&DI=1055&HL=Footer_mailsenviados_proteccioninfantil
From | Date | Subject | |
---|---|---|---|
Next Message | Karim Nassar | 2004-10-24 10:10:59 | Re: Bug or stupidity |
Previous Message | Marek Lewczuk | 2004-10-24 08:57:57 | sequence behavior - is this correct |