Re: [GENERAL] PL/pgSQL help - Mailing list pgsql-general

From Dustin Sallings
Subject Re: [GENERAL] PL/pgSQL help
Date
Msg-id Pine.SGI.3.95.990603120719.5964A-100000@bleu.west.spy.net
Whole thread Raw
In response to Re: [GENERAL] PL/pgSQL help  (tolik@icomm.ru (Anatoly K. Lasareff))
Responses Re: [GENERAL] PL/pgSQL help  (Herouth Maoz <herouth@oumail.openu.ac.il>)
List 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@spy.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. ____________


pgsql-general by date:

Previous
From: Peter T Mount
Date:
Subject: Re: PostgreSQL Install
Next
From: Dustin Sallings
Date:
Subject: Re: [GENERAL] Parallelizing PostgreSQL for Cluster