Re: Determining the DATE format with libpq

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sebastien FLAESCH <sf(at)4js(dot)com>
Cc: "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Determining the DATE format with libpq
Date: 2017-08-24 15:26:57
Message-ID: 16272.1503588417@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Sebastien FLAESCH 2017-08-24 15:44:17 Re: Determining the DATE format with libpq
Previous Message Sebastien FLAESCH 2017-08-24 15:21:55 Determining the DATE format with libpq