Insert NULL for ''
От | Daniel Gehrke |
---|---|
Тема | Insert NULL for '' |
Дата | |
Msg-id | 000d01c3319f$9055d090$05011fac@neustac005 обсуждение исходный текст |
Ответы |
Re: Insert NULL for ''
Re: Insert NULL for '' |
Список | pgsql-general |
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
В списке pgsql-general по дате отправления: