pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Sachin Kotwal <kotsachin@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Seems bug in postgres_fdw?
Date: Mon, 27 Feb 2017 10:10:38 -0500
Message-ID: <23561.1488208238@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+N_YAei=PCQGcED_q_6YBpzFOTazbagntDppO9ZKEA_3VtFGQ@mail.gmail.com>
References: <CA+N_YAei=PCQGcED_q_6YBpzFOTazbagntDppO9ZKEA_3VtFGQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Sachin Kotwal <kotsachin@gmail.com> writes:
> Here , Why postgresql takes different time when remote table and foreign
> table have different definition for timestamp column?

I believe postgres_fdw sets the timezone in its remote session to UTC
for predictability of results.  Your table definition is really at fault
for being dependent on what the session timezone is.

Personally I'd make the ins_ts column be timestamp with time zone, but
if you really don't want to do that, you could consider making the default
expression be "current_timestamp AT TIME ZONE 'something'" to force the
rotated value to be in a particular zone.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (6+ messages)  latest in thread

Message-ID: <23561.1488208238@sss.pgh.pa.us>
Permalink:  ../23561.1488208238@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/23561.1488208238@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, kotsachin@gmail.com
  Subject: Re: Seems bug in postgres_fdw?
  In-Reply-To: <23561.1488208238@sss.pgh.pa.us>
  References: <CA+N_YAei=PCQGcED_q_6YBpzFOTazbagntDppO9ZKEA_3VtFGQ@mail.gmail.com> <23561.1488208238@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox