Re: Call for objections: put back OIDs in CREATE TABLE
От | Curt Sampson |
---|---|
Тема | Re: Call for objections: put back OIDs in CREATE TABLE |
Дата | |
Msg-id | Pine.NEB.4.51.0301280745570.493@angelic.cynic.net обсуждение исходный текст |
Ответ на | Re: Call for objections: put back OIDs in CREATE TABLE (Antti Haapala <antti.haapala@iki.fi>) |
Список | pgsql-hackers |
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. cjs -- Curt Sampson <cjs@cynic.net> +81 90 7737 2974 http://www.netbsd.org Don't you know, in this new Dark Age, we're alllight. --XTC
В списке pgsql-hackers по дате отправления: