On Mon, 27 Jan 2003, Antti Haapala wrote:

>        For an INSERT command, the tag is INSERT oid rows, where rows
>       is the number of rows inserted, and oid is 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 ... ]]

Well, as was pointed out, that's a lot of data to send back if your
primary key is a huge text column, and you've still got a problem if
you have a multi-column primary key.

Since this sort of functionality is not all that frequently needed, I'd
still say it would probably be cleaner to make a new query that selects
the most recently inserted primary key. That means that a) you don't
have to send back a potentially large amount of data unless the user
asks for it, and b) multi-column primary keys work just fine.

Curt Sampson  <[EMAIL PROTECTED]>   +81 90 7737 2974   http://www.netbsd.org
    Don't you know, in this new Dark Age, we're all light.  --XTC

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to