Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dku2T-0004Bm-La for pgsql-sql@arkaria.postgresql.org; Thu, 24 Aug 2017 15:27:21 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dku2T-0007Rh-55 for pgsql-sql@arkaria.postgresql.org; Thu, 24 Aug 2017 15:27:21 +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 1dku2S-0007Pd-DH for pgsql-sql@postgresql.org; Thu, 24 Aug 2017 15:27:20 +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 1dku2L-0007hm-9C for pgsql-sql@postgresql.org; Thu, 24 Aug 2017 15:27:19 +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 v7OFQvGv016273; Thu, 24 Aug 2017 11:26:57 -0400 From: Tom Lane To: Sebastien FLAESCH cc: "pgsql-sql@postgresql.org" Subject: Re: Determining the DATE format with libpq In-reply-to: <46935bcd-5754-9deb-fc63-8162bcdd4c46@4js.com> References: <46935bcd-5754-9deb-fc63-8162bcdd4c46@4js.com> Comments: In-reply-to Sebastien FLAESCH message dated "Thu, 24 Aug 2017 17:21:55 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <16271.1503588417.1@sss.pgh.pa.us> Date: Thu, 24 Aug 2017 11:26:57 -0400 Message-ID: <16272.1503588417@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org Sebastien FLAESCH writes: > Is there a way to know the current date format used in the SQL session? > Ideally, we expect a libpq API. Use PQparameterStatus(). > We cannot do a "SHOW DateStyle" each time we executing a SELECT! You don't have to --- the server automatically reports changes in the value of that parameter. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql