Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkuK2-0005T2-LN for pgsql-sql@arkaria.postgresql.org; Thu, 24 Aug 2017 15:45:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dkuK2-0002pS-7x for pgsql-sql@arkaria.postgresql.org; Thu, 24 Aug 2017 15:45:30 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dkuJ2-00011Y-O4 for pgsql-sql@postgresql.org; Thu, 24 Aug 2017 15:44:28 +0000 Received: from mail231.strasbourg.4js.com ([92.103.31.231]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dkuIv-0008Q4-79 for pgsql-sql@postgresql.org; Thu, 24 Aug 2017 15:44:27 +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 v7OFiINU012532 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Thu, 24 Aug 2017 17:44:18 +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> From: Sebastien FLAESCH Organization: Four Js Development Tools Message-ID: <350a1d87-6abc-f149-9251-e28285504301@4js.com> Date: Thu, 24 Aug 2017 17:44:17 +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: <16272.1503588417@sss.pgh.pa.us> 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]); Thu, 24 Aug 2017 17:44:18 +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 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