Re: Writable foreign tables: how to identify rows

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Writable foreign tables: how to identify rows
Дата
Msg-id 20130306091252.GJ13803@alap2.anarazel.de
обсуждение исходный текст
Ответ на Writable foreign tables: how to identify rows  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: WIP: index support for regexp search
Следующее
От: Albe Laurenz
Дата:
Сообщение: Re: [GENERAL] Floating point error