Re: Determining the DATE format with libpq

From: Sebastien FLAESCH <sf(at)4js(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Determining the DATE format with libpq
Date: 2017-08-25 08:13:19
Message-ID: a1236c41-584b-bbb1-b6ea-01d0dfffa000@4js.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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 <sf(at)4js(dot)com> 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
>>
>>
>
>
>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Sebastien FLAESCH 2017-08-25 10:09:18 Re: Determining the DATE format with libpq
Previous Message Sebastien FLAESCH 2017-08-24 15:44:17 Re: Determining the DATE format with libpq