| От | Tom Lane |
|---|---|
| Тема | Re: Blank, nullable date column rejected by psql |
| Дата | |
| Msg-id | 31297.1549925424@sss.pgh.pa.us обсуждение |
| Ответ на | Blank, nullable date column rejected by psql (Rich Shepard <rshepard@appl-ecosys.com>) |
| Ответы |
Re: Blank, nullable date column rejected by psql
|
| Список | pgsql-general |
Rich Shepard <rshepard@appl-ecosys.com> writes:
> In a .sql file to insert rows in this table psql has a problem when there's
> no value for the next_contact column:
> $ psql -f activities.sql -d bustrac
> psql:activities.sql:6: ERROR: invalid input syntax for type date: ""
> LINE 2: ...ise. Asked him to call.',''),
> Explicitly replacing the blank field ('') with null is accepted. Why is
> this?
An empty string is not a null.
(Oracle has done untold damage to the field by failing to make this
distinction ... but in theory, and in the SQL standard, and in Postgres,
they're not at all the same thing.)
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера