On 2013-03-05 19:30:53 -0500, Tom Lane wrote: > One of the core problems for a writable-foreign-tables feature is how > to identify a previously-fetched row for UPDATE or DELETE actions. > In an ordinary Postgres table, we use the ctid system column for that, > but a remote table doesn't necessarily have such a thing. > ... > For postgres_fdw, that would really be enough, since it could just > cause a "ctid" column to be created with the usual definition. Then > it could put the remote ctid into the usual t_self field in returned > tuples. > > Supporting magic identifiers that aren't of the TID data type is > considerably harder, mainly because it's not clear how heap_getsysattr() > could know how to fetch the column value. I have some rough ideas > about that, but I suggest that we might want to punt on that extension > for the time being.
What about just making it a bytea in fdw's? Now its not nice to waste space for a (probably 1byte) bytea header, but its not too bad either. The fdw author then needs to ensure only the correct data ends up in that system column. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers