If subscription to foreign table valid ?

From: tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: If subscription to foreign table valid ?
Date: 2017-05-11 12:25:02
Message-ID: 6bac159c-4ba0-c33f-d01f-33ba01a36105@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I observed that -we cannot publish "foreign table" in Publication

postgres=# create foreign table t (n int) server db1_server options
(table_name 't1');
CREATE FOREIGN TABLE

postgres=# create publication pub for table t;
ERROR: "t" is not a table
DETAIL: Only tables can be added to publications.
postgres=#

but same thing is not true for Subscription

postgres=# create foreign table t (n int) server db1_server options
(table_name 't');
CREATE FOREIGN TABLE
postgres=# alter subscription sub refresh publication ;
NOTICE: added subscription for table public.t
ALTER SUBSCRIPTION

Is this an expected behavior ? if we cannot publish then how can we
add subscription for it.

--
regards,tushar
EnterpriseDB https://www.enterprisedb.com/
The Enterprise PostgreSQL Company

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-05-11 12:44:43 Re: alter table..drop constraint pkey, left not null un-dropped
Previous Message Amit Khandekar 2017-05-11 12:15:55 Re: UPDATE of partition key