Search Postgresql Archives

Re: Valid Input Syntax for Type DATE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/29/2012 12:28 PM, Andy Colson wrote:
On 2/29/2012 11:49 AM, Rich Shepard wrote:
I'm trying to insert rows into a table, but some date and time columns
are
missing values. In the INSERT INTO ... statements of the .sql file I've
tried various formats: ,, and ,'', and ,' ', but they all generate the
error
of invalid syntax for type date.

When I have missing date of the date and time types, how do I validly
represent them in the input file?

Rich




If the column is null'able, I think you can use the keyword: DEFAULT

insert into(id, xdate) values (1, DEFAULT);

Not 100%, but I think so.

-Andy


Or... use NULL:

insert into(id, xdate) values (1, NULL);

-Andy

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux