From: | <operationsengineer1(at)yahoo(dot)com> |
---|---|
To: | operationsengineer1(at)yahoo(dot)com, Mitch Pirtle <mitch(dot)pirtle(at)gmail(dot)com> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Last ID Problem |
Date: | 2005-02-09 16:53:18 |
Message-ID: | 20050209165318.44626.qmail@web52403.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers 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
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Fuhr | 2005-02-09 17:38:28 | Re: Last ID Problem |
Previous Message | Michael Fuhr | 2005-02-09 16:52:56 | Re: Last ID Problem |
From | Date | Subject | |
---|---|---|---|
Next Message | Oisin Glynn | 2005-02-09 17:30:51 | Returning a long string (varchar from a function) |
Previous Message | Michael Fuhr | 2005-02-09 16:52:56 | Re: Last ID Problem |