| От | Rich Shepard |
|---|---|
| Тема | [GENERAL] 9.6.1: INSERT with PK as serial |
| Дата | |
| Msg-id | alpine.LNX.2.11.1701161537580.18553@localhost обсуждение исходный текст |
| Ответы |
Re: [GENERAL] 9.6.1: INSERT with PK as serial
Re: [GENERAL] 9.6.1: INSERT with PK as serial |
| Список | pgsql-general |
I have a table with the primary key type of serial. The initial data load has 40 lines, and each has a value for every column including sequential integers from 1 through 40 for the data. When I try to read it in using 'psql -d <database_name> -f <filename.sql>' I get a syntax error at the second word in the string that is column 2. The error message does not print the integer PK. If it matters, I have all 14 columns specified but not explicitly named in the INSERT INTO command. I've looked in the manual without learning how to INSERT data in a table with a serial PK and need to learn how to do this. Rich
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера