Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dl9k6-00088H-Kb for pgsql-sql@arkaria.postgresql.org; Fri, 25 Aug 2017 08:13:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dl9k6-0001uH-6v for pgsql-sql@arkaria.postgresql.org; Fri, 25 Aug 2017 08:13:26 +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 1dl9k4-0001rG-9A for pgsql-sql@postgresql.org; Fri, 25 Aug 2017 08:13:24 +0000 Received: from mail231.strasbourg.4js.com ([92.103.31.231]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dl9k1-0005pQ-31 for pgsql-sql@postgresql.org; Fri, 25 Aug 2017 08:13:23 +0000 Received: from [10.0.40.29] (orion.strasbourg.4js.com [10.0.40.29]) (authenticated bits=0) by mail231.strasbourg.4js.com (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id v7P8DJar020488 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Fri, 25 Aug 2017 10:13:19 +0200 Subject: Re: Determining the DATE format with libpq To: pgsql-sql@postgresql.org References: <46935bcd-5754-9deb-fc63-8162bcdd4c46@4js.com> <16272.1503588417@sss.pgh.pa.us> <350a1d87-6abc-f149-9251-e28285504301@4js.com> From: Sebastien FLAESCH Organization: Four Js Development Tools Message-ID: Date: Fri, 25 Aug 2017 10:13:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <350a1d87-6abc-f149-9251-e28285504301@4js.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.99.1 at mail231 X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail231.strasbourg.4js.com [10.10.0.1]); Fri, 25 Aug 2017 10:13:19 +0200 (CEST) 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 I appologize for my poor English... I was just wondering about the overhead of a call to PQparameterStatus(). After some tests, it appears to be minor. Anyway, thanks for your help! Seb On 08/24/2017 05:44 PM, Sebastien FLAESCH wrote: > Whoooooo that's perfect!!! > > I hope it has not a big cost? > > Can I use this each time I fetch a result set? > > Even row by row with a server cursor? > > Seb > > On 08/24/2017 05:26 PM, Tom Lane wrote: >> 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