pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Olivier Hubaut <olivier@scmbb.ulb.ac.be>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: van Elsacker Frans <fve@atbib.be>
Cc: pgsql-sql@postgresql.org
Subject: Re: dump and schema
Date: Tue, 16 Dec 2003 10:27:54 +0100
Message-ID: <3FDED01A.8090009@scmbb.ulb.ac.be> (raw)
In-Reply-To: <13072.1071505327@sss.pgh.pa.us>
References: <5.2.1.1.0.20031215163225.02a4c5b8@mail.atbib.be>
	<13072.1071505327@sss.pgh.pa.us>

Tom Lane wrote:

> van Elsacker Frans <fve@atbib.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 **



view thread (5+ messages)  latest in thread

Message-ID: <3FDED01A.8090009@scmbb.ulb.ac.be>
Permalink:  ../3FDED01A.8090009@scmbb.ulb.ac.be/
Also on:    postgresql.org/message-id/3FDED01A.8090009@scmbb.ulb.ac.be

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: olivier@scmbb.ulb.ac.be, tgl@sss.pgh.pa.us, fve@atbib.be
  Subject: Re: dump and schema
  In-Reply-To: <3FDED01A.8090009@scmbb.ulb.ac.be>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox