Skip site navigation (1) Skip section navigation (2)

Re: BUG #2403: Date arithemtic using INTERVAL in UPDATE command does not work

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: "Harry E(dot) Clarke" <Harry(dot)Clarke(at)metrosky(dot)co(dot)uk>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2403: Date arithemtic using INTERVAL in UPDATE command does not work
Date: 2006-04-24 18:56:22
Message-ID: 20060424185622.GA5806@wolff.to (view raw or flat)
Thread:
Lists: pgsql-advocacypgsql-bugs
On Sat, Apr 22, 2006 at 20:34:03 +0000,
  "Harry E. Clarke" <Harry(dot)Clarke(at)metrosky(dot)co(dot)uk> wrote:
> 
> The following bug has been logged online:
> 
> Bug reference:      2403
> Logged by:          Harry E. Clarke
> Email address:      Harry(dot)Clarke(at)metrosky(dot)co(dot)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.

In response to

pgsql-bugs by date

Next:From: Volkan YAZICIDate: 2006-04-24 19:20:50
Subject: Re: BUG #2402: case insensitive match for unicode doesn't work
Previous:From: Bruce MomjianDate: 2006-04-24 18:15:53
Subject: Re: BUG #2403: Date arithemtic using INTERVAL in UPDATE command

pgsql-advocacy by date

Next:From: eleinDate: 2006-04-24 20:47:19
Subject: Re: PostgreSQL committer history?
Previous:From: Bruce MomjianDate: 2006-04-24 18:15:53
Subject: Re: BUG #2403: Date arithemtic using INTERVAL in UPDATE command

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group