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

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

From: "Harry E(dot) Clarke" <Harry(dot)Clarke(at)metrosky(dot)co(dot)uk>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #2403: Date arithemtic using INTERVAL in UPDATE command does not work
Date: 2006-04-22 20:34:03
Message-ID: 200604222034.k3MKY3KL052271@wwwmaster.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-advocacypgsql-bugs
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.

Responses

pgsql-bugs by date

Next:From: matt leeDate: 2006-04-24 04:02:27
Subject: facing problem for first time using PostgreSQL
Previous:From: SunWuKungDate: 2006-04-21 19:42:52
Subject: Re: BUG #2400: 'Ã' considered invalid UTF-8 character

pgsql-advocacy by date

Next:From: Shane AmblerDate: 2006-04-23 04:56:24
Subject: Re: Mirroring PostgreSQL related content
Previous:From: Bruno Wolff IIIDate: 2006-04-22 18:35:35
Subject: Re: Mirroring PostgreSQL related content

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