pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Problem Interval() and Timestamp() with Postgres 7.21
2+ messages / 2 participants
[nested] [flat]

* Problem Interval() and Timestamp() with Postgres 7.21
@ 2002-07-19 01:48 Peter <peterh@600ml.com.au>
  2002-07-19 02:06 ` Re: Problem Interval() and Timestamp() with Postgres 7.21 Christopher Kings-Lynne <chriskl@familyhealth.com.au>
  0 siblings, 1 reply; 2+ messages in thread

From: Peter @ 2002-07-19 01:48 UTC (permalink / raw)
  To: pgsql-php

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

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Problem Interval() and Timestamp() with Postgres 7.21
  2002-07-19 01:48 Problem Interval() and Timestamp() with Postgres 7.21 Peter <peterh@600ml.com.au>
@ 2002-07-19 02:06 ` Christopher Kings-Lynne <chriskl@familyhealth.com.au>
  0 siblings, 0 replies; 2+ messages in thread

From: Christopher Kings-Lynne @ 2002-07-19 02:06 UTC (permalink / raw)
  To: Peter <peterh@600ml.com.au>; pgsql-php

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

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2002-07-19 02:06 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-07-19 01:48 Problem Interval() and Timestamp() with Postgres 7.21 Peter <peterh@600ml.com.au>
2002-07-19 02:06 ` Christopher Kings-Lynne <chriskl@familyhealth.com.au>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox