Re: Last ID Problem

Поиск
Список
Период
Сортировка
От
Тема Re: Last ID Problem
Дата
Msg-id 20050209165318.44626.qmail@web52403.mail.yahoo.com
обсуждение исходный текст
Ответ на Re: Last ID Problem  (<operationsengineer1@yahoo.com>)
Ответы Re: Last ID Problem  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-novice
> another point of interest.  now that i've been
> refreshing my nextval() statement, my highest
> cust_id
> value is 65, but nextval() keeps incrementing from
> where it was before.  reading through the manual,
> this
> is designed in behavior.
>
> it looks like i could reset the value using
> setval().
>
> i also noticed that currval() returns the value of
> the
> last nextval().  this infers that i must call
> nextval() prior to being able to get currval(), yet
> nextval() was not included in the original
> suggestion.
>
> am i missing something here?
>
> tia...
>

actually, michael fuhr addressed this issue in this
group on 1/31/05.  not sure why it didn't register.

so, i should use nextval() if i use mitch's
methodology of calling the id first then performing
the insert.

giving that nextval increments on a refresh, is there
anything i need to worry about?

or is the worst case scenario a gap in unique ids?
this shouldn't matter as far as i can tell - as long
as the numbers are unique.

tia...



__________________________________
Do you Yahoo!?
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250

В списке pgsql-novice по дате отправления:

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: Last ID Problem
Следующее
От: "Oisin Glynn"
Дата:
Сообщение: Returning a long string (varchar from a function)