Hello,
I am porting an application from MS SQL 7.0 that dynamically creates
statements.
I have a table with a date field. Now I would like postgresql to insert NULL
when I insert '':
insert into foo (bar) values ('');
So in this case I want postgresql to insert NULL instead of giving the error
message "ERROR: Bad date external representation '' "
I know, that the error message is correct and that "insert into foo (bar)
values (NULL)" would be the correct way. But unfortunately I cannot change
the application to do so, therefore my question is:
Is there any possibility to get postgresql to insert NULL when I do "insert
into foo (bar) values ('')?
Daniel Gehrke