On Mon, Feb 27, 2017 at 10:10 AM, Tom Lane <t...@sss.pgh.pa.us> wrote:
> Sachin Kotwal <kotsac...@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 > > > Tom - Attached is a doc patch that updates the documentation for postgres-fdw to include the actual values for the 4 session variables that are set. Does that make sense to clarify? Thanks -Dave
From c00f4833993899e0f78b2950358822d4b1f0011a Mon Sep 17 00:00:00 2001 From: David Rader <dav...@openscg.com> Date: Wed, 1 Mar 2017 16:42:14 -0500 Subject: [PATCH] Document postgres-fdw session settings for parameters --- doc/src/sgml/postgres-fdw.sgml | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/doc/src/sgml/postgres-fdw.sgml b/doc/src/sgml/postgres-fdw.sgml index b31f373..eeae3cb 100644 --- a/doc/src/sgml/postgres-fdw.sgml +++ b/doc/src/sgml/postgres-fdw.sgml @@ -532,11 +532,32 @@ <para> <filename>postgres_fdw</> likewise establishes remote session settings - for the parameters <xref linkend="guc-timezone">, - <xref linkend="guc-datestyle">, <xref linkend="guc-intervalstyle">, - and <xref linkend="guc-extra-float-digits">. These are less likely - to be problematic than <varname>search_path</>, but can be handled - with function <literal>SET</> options if the need arises. + for the parameters: + <itemizedlist spacing="compact"> + <listitem> + <para> + <xref linkend="guc-timezone"> is set to <literal>UTC</> + </para> + </listitem> + <listitem> + <para> + <xref linkend="guc-datestyle"> is set to <literal>ISO</> + </para> + </listitem> + <listitem> + <para> + <xref linkend="guc-intervalstyle"> is set to <literal>postgres</> + </para> + </listitem> + <listitem> + <para> + <xref linkend="guc-extra-float-digits"> is set to <literal>3</> for remote + servers 9.0 and newer and is set to <literal>2</> for older versions + </para> + </listitem> + </itemizedlist> + These are less likely to be problematic than <varname>search_path</>, but + can be handled with function <literal>SET</> options if the need arises. </para> <para> -- 2.5.0
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers