Re: libpq: usage of PQoidValue to obtain serial primary key after insert
В списке pgsql-interfaces по дате отправления:
| От | Peter Eisentraut |
|---|---|
| Тема | Re: libpq: usage of PQoidValue to obtain serial primary key after insert |
| Дата | |
| Msg-id | 200407221954.15525.peter_e@gmx.net обсуждение исходный текст |
| Ответ на | Re: libpq: usage of PQoidValue to obtain serial primary (Michal Dobaczewski <mdobaczewski@cc.com.pl>) |
| Список | pgsql-interfaces |
Michal Dobaczewski wrote: > I wonder: how will postgres behave if it happens to generate a > repetitive oid for a table with such constraint? You get a constraint violation error. > I understand it will > work it out somehow internally and get a different oid, No. > but I would > like to be sure. It doesn't create a risk of inserts failing at > random, does it? Yes, it would (for certain definitions of "random"). > I also understand this theoretically limits the number of rows in a > table to 2^32 whereas without such constraint there is no set limit - > is that true? It's not a problem, we don't have such big tables so > far but it would be interesting to know. If you're concerned about that, you better go back to sequences and use bigserial columns. -- Peter Eisentraut http://developer.postgresql.org/~petere/
В списке pgsql-interfaces по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера