Re: Call for objections: put back OIDs in CREATE TABLE - Mailing list pgsql-hackers

From Antti Haapala
Subject Re: Call for objections: put back OIDs in CREATE TABLE
Date
Msg-id Pine.GSO.4.44.0301271238100.13057-100000@paju.oulu.fi
Whole thread Raw
In response to Re: Call for objections: put back OIDs in CREATE TABLE  (Curt Sampson <cjs@cynic.net>)
Responses Re: Call for objections: put back OIDs in CREATE TABLE  (Curt Sampson <cjs@cynic.net>)
List pgsql-hackers
> > Anyways, I've got an idea: what about having option that INSERTs return
> > "oid_status" in form...
>
> I don't understand exactly how an INSERT statement "returns" anything.
> An INSERT statement is not a function, is it?

I mean the backend message CompletedResponse (and
s/oid_status/PQoidStatus/ (as it's written in libpq-fe.h)) (ok, it's
deprecated now in favor of PQoidValue).

From postgresql docs see section Frontend-Backend protocol:
   Byte1('C')
       Identifies the message as a completed response.
   String
       The  command  tag. This is usually a single word thatidentifies which SQL command was completed.
       For  an  INSERT  command,  the tag is INSERT oid rows,       where rows is the number of rows  inserted,  and
oidis the  object  ID  of  the inserted row if rows is 1,       otherwise oid is 0.
 


Wouldn't it be nice to add here
If table doesn't contain row oids, in place of oid       is the primary key of the newly inserted record (if any)as
column= 'value' [ and column = 'value [ and ... ]]
 


-- 
Antti Haapala



pgsql-hackers by date:

Previous
From: Antonio Scotti
Date:
Subject: On Commit Triggers?
Next
From: Justin Clift
Date:
Subject: Re: [CYGWIN] Have a PG 7.3.1 Windows (cygwin) easy installer... now