From peterh@600ml.com.au Fri Jul 19 01:49:02 2002 Received: from www.cityhost1.com (unknown [216.127.70.100]) by postgresql.org (Postfix) with SMTP id C1A7F4759BE for ; Thu, 18 Jul 2002 21:49:02 -0400 (EDT) Received: (qmail 13495 invoked from network); 19 Jul 2002 17:48:16 -0000 Received: from sjeffery.atp.com.au (HELO CHERNOBIL) (203.24.179.51) by ihoju.com with SMTP; 19 Jul 2002 17:48:16 -0000 Message-ID: <005a01c22ec6$65fdcf50$33b318cb@CHERNOBIL> Reply-To: "Peter" From: "Peter" To: "PostgreSQL PHP" Subject: Problem Interval() and Timestamp() with Postgres 7.21 Date: Fri, 19 Jul 2002 11:48:05 +1000 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0055_01C22F1A.24B4A970" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Archive-Number: 200207/31 X-Sequence-Number: 1333 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-- From chriskl@familyhealth.com.au Fri Jul 19 02:06:15 2002 Received: from houston.familyhealth.com.au (unknown [203.59.48.253]) by postgresql.org (Postfix) with ESMTP id 1A8C5475924 for ; Thu, 18 Jul 2002 22:06:15 -0400 (EDT) Received: (from root@localhost) by houston.familyhealth.com.au (8.11.6/8.11.6) id g6J26Iv01147 for pgsql-php@postgresql.org; Fri, 19 Jul 2002 10:06:18 +0800 (WST) (envelope-from chriskl@familyhealth.com.au) Received: from mariner (mariner.internal [192.168.0.101]) by houston.familyhealth.com.au (8.11.6/8.9.3) with SMTP id g6J26H001058; Fri, 19 Jul 2002 10:06:17 +0800 (WST) From: "Christopher Kings-Lynne" To: "Peter" , "PostgreSQL PHP" Subject: Re: Problem Interval() and Timestamp() with Postgres 7.21 Date: Fri, 19 Jul 2002 10:06:35 +0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_006D_01C22F0B.F6D9A680" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <005a01c22ec6$65fdcf50$33b318cb@CHERNOBIL> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-scanner: scanned by Inflex 0.1.5c - (http://www.inflex.co.za/) X-Archive-Number: 200207/32 X-Sequence-Number: 1334 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
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.
 
So,=20 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=20 syntax:
 
select=20 timestamp 'now';
or=20 better: select current_timestamp;
 
and
 
select=20 interval '7 days';
 
These=20 are sql99 compatible statements...
 
Chris
 
-----Original Message-----
From:=20 pgsql-php-owner@postgresql.org [mailto:pgsql-php-owner@postgresql.org]= On=20 Behalf Of Peter
Sent: Friday, 19 July 2002 9:48 AM
To= :=20 PostgreSQL PHP
Subject: [PHP] Problem Interval() and Timestamp(= )=20 with Postgres 7.21

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--