| От | Steve Lefevre |
|---|---|
| Тема | no results for nextval() query? |
| Дата | |
| Msg-id | 466F2301.6010309@osu.edu обсуждение исходный текст |
| Ответы |
Re: no results for nextval() query?
|
| Список | pgsql-novice |
Hello all - I'm having problems with a primary key column that has a sequence. I'm trying to reserve a value using nextval ( I've also tried currval() ), but my query returns no results. I was originally confused because I was doing "SELECT nextval(column_name) FROM table" instead of "SELECT nextval(sequence_name) FROM table". Then, I had the sequence name wrong, so I got a "does not exist" error. However, now that I have the name right -- and I think it's right because I don't get an error -- I get an empty result set. What am I doing wrong? The sequence seems to be working, because the primary key field defaults to the next value in the sequence when I do an insert. Steve Lefevre
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера