| От | Allan Engelhardt |
|---|---|
| Тема | Re: Notes about int8 sequences |
| Дата | |
| Msg-id | 3B6F0AF2.7EBB0E36@cybaea.com обсуждение исходный текст |
| Ответ на | Notes about int8 sequences (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-hackers |
Tom Lane wrote:
> * How should one invoke nextval() and friends on such a sequence?
> Directly applying the existing convention, eg, nextval('sequencename'),
> won't work because those functions are declared to return int4. One
I'm not really a hacker, but why couldn't you simply change nextval to return int8 in all cases? Presumably there is
anautomatic (and silent) conversion from int8 to int4 where the range fits? The overhead of creating an int8 return
valuefor an old-style int4 sequence (and converting it back to int4 for the INSERT/UPDATE) seems very small.
I'm missing something obvious again?
Allan.
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера