Insert a default timestamp when nothing given

From: " Martin Pohl" <Nilpherd(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Insert a default timestamp when nothing given
Date: 2006-01-19 11:55:44
Message-ID: 31905.1137671744@www74.gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hi,

I have to port an application from MS SQL7 to Postgresql (7.4).

When I have a column with a datetime on MS SQL7 the following is possible:
INSERT INTO mytable (mydate) values ('');

In this case MSSQL will insert '01.01.1900' as the date.

When I do the same on Postgresql it says:
"invalid input syntax for type timestamp with time zone: ''".

Unfortunately the application I have to port often uses '' as a date.

My question:
Is there any way to have MSSQLs behavior in PostgreSQL?

Thanks for answers

--
Telefonieren Sie schon oder sparen Sie noch?
NEU: GMX Phone_Flat http://www.gmx.net/de/go/telefonie

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sean Davis 2006-01-19 12:03:47 Normalized storage to denormalized report
Previous Message Michelle Konzack 2006-01-19 10:30:57 tsearch2 and "how to use"