dbTalk Databases Forums  

[BUGS] BUG #2403: Date arithemtic using INTERVAL in UPDATE command does not work

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #2403: Date arithemtic using INTERVAL in UPDATE command does not work in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default [BUGS] BUG #2403: Date arithemtic using INTERVAL in UPDATE command does not work - 04-24-2006 , 01:02 PM







The following bug has been logged online:

Bug reference: 2403
Logged by: Harry E. Clarke
Email address: Harry.Clarke (AT) metrosky (DOT) co.uk
PostgreSQL version: 8.1.3
Operating system: Suse Linux 10.0
Description: Date arithemtic using INTERVAL in UPDATE command does
not work
Details:

Entering the command

UPDATE table SET col_date = col_date - INTERVAL '100' YEAR where condition;

does not perform any date aritimetic, and thus the date value in col_date
remains unchanged. col_date contains a value such as '2039-12-07'. If the
command

UPDATE table SET col_date = DATE '1939-12-07' where condition;

is entered, the command executes as expected.

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply With Quote
  #2  
Old   
AT
 
Posts: n/a

Default Re: [BUGS] BUG #2403: Date arithemtic using INTERVAL in UPDATE command does not work - 04-24-2006 , 02:44 PM






On Sat, Apr 22, 2006 at 20:34:03 +0000,
"Harry E. Clarke" <Harry.Clarke (AT) metrosky (DOT) co.uk> wrote:
Quote:
The following bug has been logged online:

Bug reference: 2403
Logged by: Harry E. Clarke
Email address: Harry.Clarke (AT) metrosky (DOT) co.uk
PostgreSQL version: 8.1.3
Operating system: Suse Linux 10.0
Description: Date arithemtic using INTERVAL in UPDATE command does
not work
Details:

Entering the command

UPDATE table SET col_date = col_date - INTERVAL '100' YEAR where condition;

does not perform any date aritimetic, and thus the date value in col_date
remains unchanged. col_date contains a value such as '2039-12-07'. If the
command

UPDATE table SET col_date = DATE '1939-12-07' where condition;

is entered, the command executes as expected.
You probably just made a mistake with the condition. But since you haven't
shown us what it was, we can't give you any specific advice about it.

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.