Re: [HACKERS] Last ID Problem - Mailing list pgsql-novice

From Joshua D. Drake
Subject Re: [HACKERS] Last ID Problem
Date
Msg-id 41FFB4D4.4060801@commandprompt.com
Whole thread Raw
Responses Re: [HACKERS] Last ID Problem  (John Hansen <john@geeknet.com.au>)
List pgsql-novice
>
>
>
>I have a suggestion...
>
>For libpq:
>
>Since OID's are now deprecated, and will eventually disappear,
>wouldn't it be a good idea, to have INSERT and UPDATE return
>a copy of the tuple that was inserted/updated?
>
>This way, you could have a funtion to fetch an arbitrary named
>column from that tuple.
>Like: last_insert_value(tuple,'column_name')
>
>

With a default to return the primary key?

Sincerely,

Joshua D. Drake



>... John
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
>


--
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - jd@commandprompt.com - http://www.commandprompt.com
PostgreSQL Replicator -- production quality replication for PostgreSQL


Attachment

pgsql-novice by date:

Previous
From: Neil Conway
Date:
Subject: Re: [HACKERS] Last ID Problem
Next
From: "Rodolfo J. Paiz"
Date:
Subject: DB Error: connect failed