Oddity with literal intervals - Mailing list pgsql-general

From Mike Mascari
Subject Oddity with literal intervals
Date
Msg-id 4059DB42.8070605@mascari.com
Whole thread Raw
Responses Re: Oddity with literal intervals
List pgsql-general
Here's something odd I stumbled upon:

[estore@lexus] select now() + '1 day';
            ?column?
-------------------------------
  2004-03-19 12:19:44.997344-05
(1 row)

[estore@lexus] select now() - '1 day';
ERROR:  invalid input syntax for type timestamp with time zone: "1 day"
[estore@lexus] select now() + '-1 day';
            ?column?
-------------------------------
  2004-03-17 12:20:56.287847-05
(1 row)

[estore@lexus] select version();
                                                  version

---------------------------------------------------------------------------------------------------------
  PostgreSQL 7.4.1 on i686-pc-linux-gnu, compiled by GCC gcc (GCC)
3.2 20020903 (Red Hat Linux 8.0 3.2-7)
(1 row)

It seems odd...

Mike Mascari



pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Case insensitive ORDER BY
Next
From: Bruno Wolff III
Date:
Subject: Re: Huge number of raws