From: | Dustin Sallings <dustin(at)spy(dot)net> |
---|---|
To: | "Anatoly K(dot) Lasareff" <tolik(at)icomm(dot)ru> |
Cc: | Mike Haberman <mikeh(at)ncsa(dot)uiuc(dot)edu>, pgsql-general(at)postgreSQL(dot)org |
Subject: | Re: [GENERAL] PL/pgSQL help |
Date: | 1999-06-03 19:08:31 |
Message-ID: | Pine.SGI.3.95.990603120719.5964A-100000@bleu.west.spy.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 3 Jun 1999, Anatoly K. Lasareff wrote:
# Yes. 'serial' type implements as 'int' type for field and sequence,
# which mane is <tablename>_<fieldname>_seq. So you can do this:
#
# INSERT into Network (parentID, networkName) values (pid, mname); netid
# := Network_networkID_seq.last_value;
That doesn't tell you the last value you added, that tells you the
last value that was added at all. currval('network_networkid_seq') tells
you the last one you added.
--
SA, beyond.com My girlfriend asked me which one I like better.
pub 1024/3CAE01D5 1994/11/03 Dustin Sallings <dustin(at)spy(dot)net>
| Key fingerprint = 87 02 57 08 02 D0 DA D6 C8 0F 3E 65 51 98 D8 BE
L_______________________ I hope the answer won't upset her. ____________
From | Date | Subject | |
---|---|---|---|
Next Message | Dustin Sallings | 1999-06-03 19:09:38 | Re: [GENERAL] Parallelizing PostgreSQL for Cluster |
Previous Message | Peter T Mount | 1999-06-03 17:21:41 | Re: PostgreSQL Install |