Problem Interval() and Timestamp() with Postgres 7.21
am 19.07.2002 03:48:05 von Peter
This is a multi-part message in MIME format.
------=_NextPart_000_0055_01C22F1A.24B4A970
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
Has anyone expreience these problems with postgres 7.21??
timestamp('now') or interval('7 days') now result in parse errors when exec=
uted ????
this renders an import script of mine useless, when it was running without =
problems on previous versions?
have i compiled postgres wrong? has this functionality been dropped from po=
stgresql????
any help would be greately appreciated.
regards, Peter
------=_NextPart_000_0055_01C22F1A.24B4A970
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
Has anyone expreience these problems with =
postgres=20
7.21??
timestamp('now') or interval('7 days') now=
result=20
in parse errors when executed ????
this renders an import script of mine usel=
ess, when=20
it was running without problems on previous versions?
have i compiled postgres wrong? has this=
=20
functionality been dropped from postgresql????
any help would be greately=20
appreciated.
regards, Peter
------=_NextPart_000_0055_01C22F1A.24B4A970--
Re: Problem Interval() and Timestamp() with Postgres 7.21
am 19.07.2002 04:06:35 von Christopher Kings-Lynne
This is a multi-part message in MIME format.
------=_NextPart_000_006D_01C22F0B.F6D9A680
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
The timestamp() syntax has been modified, so be compliant with SQL99. (eg.
timestamp(4) for 4 digits of millisecond precision). It's in the release
notes.
So, you will now need to double quote and it will work fine:
"timestamp"('now') and "interval"('7 days');
However I suggest you just convert to standard syntax:
select timestamp 'now';
or better: select current_timestamp;
and
select interval '7 days';
These are sql99 compatible statements...
Chris
-----Original Message-----
From: pgsql-php-owner@postgresql.org
[mailto:pgsql-php-owner@postgresql.org]On Behalf Of Peter
Sent: Friday, 19 July 2002 9:48 AM
To: PostgreSQL PHP
Subject: [PHP] Problem Interval() and Timestamp() with Postgres 7.21
Hello,
Has anyone expreience these problems with postgres 7.21??
timestamp('now') or interval('7 days') now result in parse errors when
executed ????
this renders an import script of mine useless, when it was running without
problems on previous versions?
have i compiled postgres wrong? has this functionality been dropped from
postgresql????
any help would be greately appreciated.
regards, Peter
------=_NextPart_000_006D_01C22F0B.F6D9A680
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
ze=3D2>The=20
timestamp() syntax has been modified, so be compliant with SQL99. (eg=
..=20
timestamp(4) for 4 digits of millisecond precision). It's in the rele=
ase=20
notes.
size=3D2>
ze=3D2>So,=20
you will now need to double quote and it will work fine:
size=3D2>
size=3D2>"timestamp"('now') and "interval"('7 days');
size=3D2>
size=3D2>However I suggest you just convert to standard=20
syntax:
size=3D2>
ze=3D2>select=20
timestamp 'now';
ze=3D2>or=20
better: select current_timestamp;
size=3D2>
size=3D2>and
size=3D2>
ze=3D2>select=20
interval '7 days';
size=3D2>
ze=3D2>These=20
are sql99 compatible statements...
size=3D2>
size=3D2>Chris
size=3D2>
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px soli=
d; MARGIN-RIGHT: 0px">
Hello,
Has anyone expreience these problems wit=
h=20
postgres 7.21??
timestamp('now') or interval('7 days') n=
ow result=20
in parse errors when executed ????
this renders an import script of mine us=
eless,=20
when it was running without problems on previous versions?
have i compiled postgres wrong? has this=
=20
functionality been dropped from postgresql????
any help would be greately=20
appreciated.
regards,=20
Peter
------=_NextPart_000_006D_01C22F0B.F6D9A680--