| От | Tom Lane |
|---|---|
| Тема | Re: Insert question null/not null serial, etc. |
| Дата | |
| Msg-id | 8888.1075590932@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Insert question null/not null serial, etc. (Russ Schneider <russ@sugapablo.com>) |
| Список | pgsql-general |
Russ Schneider <russ@sugapablo.com> writes:
> insert into nuke_referer values (NULL,'whatever');
> Which gives me the error: "Warning: pg_exec(): Query failed: ERROR:
> ExecAppend: Fail to add null value in not null attribute rid"
Sounds like they are expecting NULL to get replaced with the column
default, which is shall we say a rather surprising reading of the SQL
spec (and yeah, I know which other database acts that way).
> Since nowhere in the 3000 files of PHP-Nuke do they actually name columns
> for insert commands, does anyone have any suggestions? Can NULL be
> replaced with anything?
In the last PG release or two you could write DEFAULT instead of NULL
and get the desired behavior.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера