| От | Tim Landscheidt |
|---|---|
| Тема | Re: Null vs. Empty String in Postgres 8.3.8 |
| Дата | |
| Msg-id | m3sk79yldr.fsf@passepartout.tim-landscheidt.de обсуждение исходный текст |
| Ответ на | Null vs. Empty String in Postgres 8.3.8 ("Wang, Mary Y" <mary.y.wang@boeing.com>) |
| Список | pgsql-general |
Peter Hunsberger <peter.hunsberger@gmail.com> wrote: >>> I still don't get it. I do want a zero for the subversion_flags to be stored in the table. But it returned an errorbecause it didn't like subversion_flags='' in the UPDATE SQL statement. >>> subversion_flags | integer | not null default 0 >> Right. '' is not 0. the old version of pgsql converted '' to 0 for >> you, incorrectly. Now if you want 0 you need to say 0. > Or, since you have the default, set it to null.... (Which may be what > you thought you where doing?) Setting it to NULL does not set it to the default value. You have to use the keyword DEFAULT for that. Tim
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера