Re: COPY command on a table column marked as GENERATED ALWAYS
Вложения
В списке pgsql-hackers по дате отправления:
| От | Michael Paquier |
|---|---|
| Тема | Re: COPY command on a table column marked as GENERATED ALWAYS |
| Дата | |
| Msg-id | 20190729015747.GG6959@paquier.xyz обсуждение исходный текст |
| Ответ на | COPY command on a table column marked as GENERATED ALWAYS (Ashutosh Sharma <ashu.coek88@gmail.com>) |
| Ответы |
Re: COPY command on a table column marked as GENERATED ALWAYS
|
| Список | pgsql-hackers |
On Fri, Jul 26, 2019 at 03:12:28PM +0530, Ashutosh Sharma wrote: > Hi All, > > I'm able to insert data into a table column marked as GENERATED ALWAYS > using COPY command however, it fails with INSERT command. Isn't that a > bug with COPY command? Per the documentation in the section for GENERATED ALWAYS: https://www.postgresql.org/docs/devel/sql-createtable.html "The clauses ALWAYS and BY DEFAULT determine how the sequence value is given precedence over a user-specified value in an INSERT statement. If ALWAYS is specified, a user-specified value is only accepted if the INSERT statement specifies OVERRIDING SYSTEM VALUE. If BY DEFAULT is specified, then the user-specified value takes precedence. See INSERT for details. (In the COPY command, user-specified values are always used regardless of this setting.)" So it behaves as documented. -- Michael
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера