Re: inherit support for foreign tables

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: inherit support for foreign tables
Дата
Msg-id 20150414185218.GX4369@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: inherit support for foreign tables  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Ответы Re: inherit support for foreign tables  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Re: inherit support for foreign tables  (Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>)
Список pgsql-hackers
Jim Nasby wrote:
> On 4/14/15 5:49 AM, Etsuro Fujita wrote:
> > postgres=# create foreign table ft1 (c1 int) server myserver options
> > (table_name 't1');
> > CREATE FOREIGN TABLE
> > postgres=# create foreign table ft2 (c1 int) server myserver options
> > (table_name 't2');
> > CREATE FOREIGN TABLE
> > postgres=# alter foreign table ft2 inherit ft1;
> > ALTER FOREIGN TABLE
> > postgres=# select * from ft1 for update;
> > ERROR:  could not find junk tableoid1 column
> > 
> > I think this is a bug.  Attached is a patch fixing this issue.
> 
> What happens when the foreign side breaks the inheritance? Does the FDW
> somehow know to check that fact for each query?

This is a meaningless question.  The remote tables don't have to have an
inheritance relationship already; only the local side sees them as
connected.

I think the real question is whether we're now (I mean after this patch)
emitting useless tableoid columns that we didn't previously have.  I
think the answer is yes, and if so I think we need a smaller comb to fix
the problem.  This one seems rather large.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: logical column ordering
Следующее
От: David Fetter
Дата:
Сообщение: Re: Make more portable TAP tests of initdb