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

Re: Valid Input Syntax for Type DATE

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Valid Input Syntax for Type DATE
Date: 2012-02-29 21:42:09
Message-ID: alpine.LNX.2.00.1202291341190.15032@salmo.appl-ecosys.com (view raw or flat)
Thread:
Lists: pgsql-general
On Wed, 29 Feb 2012, Andrew Gould wrote:

>>> If the column is null'able, I think you can use the keyword: DEFAULT
>>> insert into(id, xdate) values (1, DEFAULT);

>> Or... use NULL:
>> insert into(id, xdate) values (1, NULL);

> NULL works, but one advantage of using DEFAULT is that you won't have to
> worry which columns are set to NOT NULL.  This assumes that the NOT NULL
> columns have default values assigned to them, which is a good idea.

   Thank you both.

Rich


In response to

pgsql-general by date

Next:From: Alban HertroysDate: 2012-02-29 23:00:30
Subject: Re: Re: One transaction by connection - commit subdetails without release master transaction?
Previous:From: Ben ChobotDate: 2012-02-29 19:44:10
Subject: Re: Re: One transaction by connection - commit subdetails without release master transaction?

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