From: | Sachin Kotwal <kotsachin(at)gmail(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Seems bug in postgres_fdw? |
Date: | 2017-02-27 07:40:34 |
Message-ID: | CA+N_YAei=PCQGcED_q_6YBpzFOTazbagntDppO9ZKEA_3VtFGQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
Hi All,
Below are findings for postgres_fdw related to timezone.
-- Remote Sever
Server A (timezone = 'US/Eastern')
Create table public.test_timestamp(
col1 varchar,
ins_ts timestamp without time zone not null default
current_timestamp
) without oids;
( Assume time is 10:00:00 AM EST ) insert into public.test_timestamp( col1
) values ('foo');
select ins_ts from public.test_timestamp;
--- Returns 10:00:00
delete from public.test_timestamp;
-- Local Server
Server B (timezone = 'US/Eastern')
CREATE SERVER server_1 FOREIGN DATA WRAPPER postgres_fdw OPTIONS (port
'5433', dbname 'pgbench');
CREATE USER MAPPING FOR PUBLIC SERVER server_1 OPTIONS (password '');
Create foreign table public.foreign_table(
col1 varchar
) SERVER server_1
OPTIONS (schema_name 'public', table_name 'test_timestamp');
( Assume time is 10:00:00 AM EST ) insert into public.foreign_table( col1 )
values ('from remote');
Now, on Server A, again issue
select ins_ts from public.test_timestamp;
--- Returns 15:00:00
Here , Why postgresql takes different time when remote table and foreign
table have different definition for timestamp column?
I think create foreign table should not allowed , If allowed it should give
same result.
--
Thanks and Regards,
Sachin Kotwal
From | Date | Subject | |
---|---|---|---|
Next Message | digoal | 2017-02-27 08:13:38 | BUG #14571: 10.0 devel hang when create subscription |
Previous Message | adrian.mondaca13 | 2017-02-27 04:52:48 | BUG #14570: Validation error |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2017-02-27 07:54:34 | Re: Creation of "Future" commit fest, named 2017-07 |
Previous Message | Amit Langote | 2017-02-27 06:59:42 | Re: Documentation improvements for partitioning |