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

Re: dump and schema

From: Olivier Hubaut <olivier(at)scmbb(dot)ulb(dot)ac(dot)be>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: van Elsacker Frans <fve(at)atbib(dot)be>, pgsql-sql(at)postgresql(dot)org
Subject: Re: dump and schema
Date: 2003-12-16 09:27:54
Message-ID: 3FDED01A.8090009@scmbb.ulb.ac.be (view raw or flat)
Thread:
Lists: pgsql-sql
Tom Lane wrote:

> van Elsacker Frans <fve(at)atbib(dot)be> writes:
> 
>>All my tables (more than 100) have a field datumi of type date default 
>>today, as this example:
>>CREATE TABLE tabel (
>>     ....
>>     datumi date DEFAULT 'today',
>>     ....
>>);
> 
> 
> This does not work anymore in PG 7.4.  You need something like
> 
> 	datumi date DEFAULT CURRENT_DATE,
> 
> 			regards, tom lane
> 
I think this won't get the same result he expects. As I know, the 
CURRENT_DATE will always give the current day, not the day you inserted 
the row.

I think the now()::date seems to be a better way to translate the 
'today' value.

-- 
Ci-git une signature avortee.
** RIP **

In response to

Responses

pgsql-sql by date

Next:From: Alessandro DepaseDate: 2003-12-16 11:46:49
Subject: failed to build any 5-way joins
Previous:From: Tom LaneDate: 2003-12-16 03:55:38
Subject: Re: arrays in pl/pgsql

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