----- Original Message -----
Sent: Monday, April 14, 2003 4:21
PM
Subject: RE: [LUG] postgresql
inserts
You cand
o:
SELECT
currval('sequence_name') as cv;
The default
sequence names for serial are, IIRC:
<table_name>_<column_name>_seq
Alternativley you
can do a nextval('seq_name') then insert that value (which is the way I
prefer).
Cheers,
-
Stuart
Does postgres have stored procedures or
similar?
Hi,
Not really a linux specific problem, but
in postgreSQL i am trying to have an INSERT statement, that has a serial as the only unique identifier. This serial
is not set by myself (postgres handles this) but as this is the only
unqiue identifier, i need to return it as I do the insert. Any
suggestions?
Cheers
Rob
Nowik
******************************************************************************
This
email has been virus checked by the Eclipse Internet MAILsafe
service
******************************************************************************
www:
http://www.eclipse.net.uk/ email: eclipse@xxxxxxxxxxxxxx
******************************************************************************
DISCLAIMER:The information in this message is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this message by
anyone else is unauthorised. If you are not the intended recipient, any
disclosure, copying, or distribution of the message, or any action or omission
taken by you in reliance on it, is prohibited and may be unlawful. Please
immediately contact the sender if you have received this message in error.
Thank you.