Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Novice > Re: Reuse seria...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 3048 of 3177
Post > Topic >>

Re: Reuse serial numbers?

by nobs@[EMAIL PROTECTED] (Emil Obermayr) Mar 27, 2008 at 11:06 AM

On Thu, Mar 27, 2008 at 10:49:06AM +0100, A. Kretschmer wrote:
>
> Why do you think you need the numbers?

A typical application for low numbers (not letting them increase over
time) is the "human readabilitly" if you need them outside the DB as
labels on boxes for "real life transactions".

One solution is writing a function using a self join on the column
on a.n + 1 = b.n searching for NULL results; then returning the a.n+1.

I have this somewhere in the jungle of my source code snippets. Tell me
if you need me searching for it :)

Emil


-- 
Sent via pgsql-novice mailing list (pgsql-novice@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice
 




 2 Posts in Topic:
Re: Reuse serial numbers?
nobs@[EMAIL PROTECTED] (  2008-03-27 11:06:24 
Re: Reuse serial numbers?
nobs@[EMAIL PROTECTED] (  2008-03-27 11:54:13 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Thu Jul 24 12:22:45 CDT 2008.