diff options
author | Bruce Momjian <bruce@momjian.us> | 2001-10-14 23:27:31 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2001-10-14 23:27:31 +0000 |
commit | 360e61e1f5d86cb7296edf28475334f0fcf4ecb3 (patch) | |
tree | ec2948872f709e60c2320f8c258b9f13aa6e12a5 /doc/src | |
parent | 1ebc028cbcbdf7e5a156ca68ee845d8d092165b9 (diff) | |
download | postgresql-360e61e1f5d86cb7296edf28475334f0fcf4ecb3.tar.gz postgresql-360e61e1f5d86cb7296edf28475334f0fcf4ecb3.zip |
Update FAQ.
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/FAQ/FAQ.html | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/doc/src/FAQ/FAQ.html b/doc/src/FAQ/FAQ.html index d3f5da6f8f0..efb5724282e 100644 --- a/doc/src/FAQ/FAQ.html +++ b/doc/src/FAQ/FAQ.html @@ -12,7 +12,7 @@ alink="#0000FF"> <H1>Frequently Asked Questions (FAQ) for PostgreSQL</H1> - <P>Last updated: Sat Oct 13 01:26:55 EDT 2001</P> + <P>Last updated: Sun Oct 14 19:27:20 EDT 2001</P> <P>Current maintainer: Bruce Momjian (<A href= "mailto:pgman@candle.pha.pa.us">pgman@candle.pha.pa.us</A>)<BR> @@ -1050,10 +1050,8 @@ BYTEA bytea variable-length byte array (null-safe) example table in <A href="#4.16.1">4.16.1</A>, that might look like this in Perl:</P> <PRE> - $sql = "SELECT nextval('person_id_seq')"; - $newSerialID = ($conn->selectrow_array($sql))[0]; - INSERT INTO person (id, name) VALUES ($newSerialID, 'Blaise Pascal'); - $res = $dbh->do($sql); + new_id = output of "SELECT nextval('person_id_seq')" + INSERT INTO person (id, name) VALUES (new_id, 'Blaise Pascal'); </PRE> You would then also have the new value stored in <CODE>$newSerialID</CODE> for use in other queries (e.g., as a @@ -1068,9 +1066,7 @@ BYTEA bytea variable-length byte array (null-safe) <I>after</I> it was inserted by default, e.g.,</P> <PRE> INSERT INTO person (name) VALUES ('Blaise Pascal'); - $res = $conn->do($sql); - $sql = "SELECT currval('person_id_seq')"; - $newSerialID = ($conn->selectrow_array($sql))[0]; + new_id = output of "SELECT currval('person_id_seq')"; </PRE> Finally, you could use the <A href="#4.17"><SMALL>OID</SMALL></A> returned from the <SMALL>INSERT</SMALL> statement to look up the |