From: | Detlef Jockheck <detlef(at)jockheck(dot)de> |
---|---|
To: | Oliver Elphick <olly(at)lfix(dot)co(dot)uk> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: automatic creation of oid |
Date: | 2003-03-01 18:54:31 |
Message-ID: | 200303011854.h21IsVD03783@krakatau.jockheck.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Am Samstag, 1. März 2003 00:45 schrieben Sie:
> On Fri, 2003-02-28 at 20:10, Detlef Jockheck wrote:
> > Hi,
> >
> > I'm new to postgresql. How can automatically create unique object
> > identifyer during insertion of new data. I 've seen that a can use a
> > sequence, but I think there must be another way?
>
> Why must there? Using a sequence is the correct way to do it. To
> automate the process, declare a column of SERIAL type. (SERIAL is
> shorthand for creating a sequence and attaching it to the column's
> default.)
Hi Oliver,
Yes! Thats what I was looking for. I've seen it in the documentation but
could'nt remember how it works. Thanks for the tip :-)
ciao
Detlef
--
# Dipl. Ing. (FH) Detlef Jockheck
# E-mail: detlef(at)jockheck(dot)de
# -------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | Mark Cave-Ayland | 2003-03-01 21:09:37 | plpgsql memory leak in 7.3.2? |
Previous Message | Nick Barr | 2003-03-01 17:11:29 | Re: Warning: Supplied argument is not a valid PostgreSQL link resource |