Re: Auto-increment and data importing: problem pointed out in PHP builder review?
В списке pgsql-general по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Auto-increment and data importing: problem pointed out in PHP builder review? |
| Дата | |
| Msg-id | 14694.963283578@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Auto-increment and data importing: problem pointed out in PHP builder review? ("Randall Parker" <randall@nls.net>) |
| Список | pgsql-general |
"Randall Parker" <randall@nls.net> writes:
> In particular, on his second complaint about the import and
> auto_increment: via what manner can one import a bunch of records and
> then not have the auto_increment next value be correct?
I *think* what he's griping about is that a COPY IN doesn't
automagically change the sequence counter to be >= last imported value
for the serial column.
Of course you can set the counter --- pg_dump scripts do so --- but it
doesn't happen automatically.
You could maybe force that to happen with a trigger, but IMHO the next
work that ought to be done on SERIAL is to convert it into a "real"
datatype. Then stuff like this could be made to happen in the datatype-
specific I/O routines, which seems like a better answer ...
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера