In 7.4 ensure you have DEFAULT now () with no spaces - Mailing list pgsql-sql

From David B
Subject In 7.4 ensure you have DEFAULT now () with no spaces
Date
Msg-id GOEGKICPFOPNLIEIHGFJEEMMCNAA.postgresql@thegatelys.com
Whole thread Raw
Responses Re: In 7.4 ensure you have DEFAULT now () with no spaces  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-sql
Just a heads up folks...

In converting from 7.3 to 7.4 one got-ya we had was...

We had been testing 7.4 for a few days and just noticed that some tables had
created_timestamp rows with a date/time of the date the DB was created...not
the date/time the insert was done.

Looking at those tables the create DDL's for those few tables contained now
()
as in:

created_timestamp  timestamp DEFAULT now ()   -- note the space between now
and ()

Most had correctly been defined without the space - as in now()


Simple matter of doing ALTER TABLE x ALTER COLUMN y SET DEFAULT now() while
still in 7.3 to fix.

7.4 Migration documentation does mentions this but it can easily slip by as
it did with us...


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.704 / Virus Database: 460 - Release Date: 6/12/2004



pgsql-sql by date:

Previous
From: "Jie Liang"
Date:
Subject: Re: [JDBC] Prepare Statement
Next
From: "Jaime Casanova"
Date:
Subject: case stement when null