Re: Converting a TimestampTz into a C# DateTime

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "'Jerome Wagner *EXTERN*'" <jerome(dot)wagner(at)laposte(dot)net>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Converting a TimestampTz into a C# DateTime
Date: 2016-11-14 15:38:37
Message-ID: A737B7A37273E048B164557ADEF4A58B5397CD01@ntex2010i.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jerome Wagner wrote:
> seeing you answer I have a question for which I found no answer a few weeks ago : is there a way to
> know at runtime which internal representation timestamps have ?
> I am trying to deal with the COPY binary protocol with only SQL access to the remote server and would
> like to find a way to know the internal representation to read / write the correct timestamps.

I guess you have to use the SPI interface to run the SQL statement

SHOW integer_datetimes;

and check if the result is 'on'.

Yours,
Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Arjen Nienhuis 2016-11-14 17:56:54 Re: Converting a TimestampTz into a C# DateTime
Previous Message Tom Lane 2016-11-14 15:36:17 Re: Converting a TimestampTz into a C# DateTime