Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciMwm-0002XT-PS for pgsql-bugs@arkaria.postgresql.org; Mon, 27 Feb 2017 15:10:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1ciMwl-0001wo-Vs for pgsql-bugs@arkaria.postgresql.org; Mon, 27 Feb 2017 15:10:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ciMwl-0001wO-7E for pgsql-bugs@postgresql.org; Mon, 27 Feb 2017 15:10:43 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ciMwi-0003OI-Kc for pgsql-bugs@postgresql.org; Mon, 27 Feb 2017 15:10:42 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v1RFAcjN023562; Mon, 27 Feb 2017 10:10:38 -0500 From: Tom Lane To: Sachin Kotwal cc: pgsql-bugs@postgresql.org Subject: Re: Seems bug in postgres_fdw? In-reply-to: References: Comments: In-reply-to Sachin Kotwal message dated "Mon, 27 Feb 2017 13:10:34 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <23560.1488208238.1@sss.pgh.pa.us> Date: Mon, 27 Feb 2017 10:10:38 -0500 Message-ID: <23561.1488208238@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Sachin Kotwal 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