Re: [Proposal] Global temporary tables
От | Prabhat Sahu |
---|---|
Тема | Re: [Proposal] Global temporary tables |
Дата | |
Msg-id | CANEvxPrpbjpXNba8kOFDZd8K+BbNQ1=LSaFTbrgg+mWbMQ=d0w@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [Proposal] Global temporary tables (Prabhat Sahu <prabhat.sahu@enterprisedb.com>) |
Ответы |
Re: [Proposal] Global temporary tables
Re: [Proposal] Global temporary tables |
Список | pgsql-hackers |
Hi Wenjing,
Please check the below scenario, where the Foreign table on GTT not showing records.
postgres=# create extension postgres_fdw;
CREATE EXTENSION
postgres=# do $d$
begin
execute $$create server fdw foreign data wrapper postgres_fdw options (host 'localhost',dbname 'postgres',port '$$||current_setting('port')||$$')$$;
end;
$d$;
DO
postgres=# create user mapping for public server fdw;
CREATE USER MAPPING
postgres=# create table lt1 (c1 integer, c2 varchar(50));
CREATE TABLE
postgres=# insert into lt1 values (1,'c21');
INSERT 0 1
postgres=# create foreign table ft1 (c1 integer, c2 varchar(50)) server fdw options (table_name 'lt1');
CREATE FOREIGN TABLE
postgres=# select * from ft1;
c1 | c2
----+-----
1 | c21
(1 row)
postgres=# create global temporary table gtt1 (c1 integer, c2 varchar(50));
CREATE TABLE
postgres=# insert into gtt1 values (1,'gtt_c21');
INSERT 0 1
postgres=# create foreign table f_gtt1 (c1 integer, c2 varchar(50)) server fdw options (table_name 'gtt1');
CREATE FOREIGN TABLE
c1 | c2
----+---------
1 | gtt_c21
(1 row)
postgres=# select * from f_gtt1;
c1 | c2
----+----
(0 rows)
c1 | c2
----+----
(0 rows)
With Regards,
Prabhat Kumar Sahu
EnterpriseDB: http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: