Re: Converting a TimestampTz into a C# DateTime

Поиск
Список
Период
Сортировка
От Arjen Nienhuis
Тема Re: Converting a TimestampTz into a C# DateTime
Дата
Msg-id CAG6W84LzZQYj4WanqqvEh-3fDq0XJ=aR2fBsaiwBXr=BuA=L1A@mail.gmail.com
обсуждение исходный текст
Ответ на Converting a TimestampTz into a C# DateTime  (valeriof <valerio_farruggio@hotmail.com>)
Ответы Re: Converting a TimestampTz into a C# DateTime  (valeriof <valerio_farruggio@hotmail.com>)
Список pgsql-general

On Nov 14, 2016 12:53, "valeriof" <valerio_farruggio@hotmail.com> wrote:
>
> Hi,
> I'm handling a TimestampTz value inside a plugin to stream WAL changes to a
> .NET client application. What I'm trying to do is to return all possible
> column changes as binary (don't like to have Postgres handle the conversion
> to string as I may need to have access to the bytes at the client level). In
> case of a TimestampTz, is it possible to return the 8-bytes long integer and
> then from the C# application convert the value to Ticks?

Npgsql supports the binary COPY protocol. Their implementation is here:

https://github.com/npgsql/npgsql/blob/dev/src/Npgsql/TypeHandlers/DateTimeHandlers/TimeStampHandler.cs

В списке pgsql-general по дате отправления:

Предыдущее
От: Albe Laurenz
Дата:
Сообщение: Re: Converting a TimestampTz into a C# DateTime
Следующее
От: Poul Kristensen
Дата:
Сообщение: C code with embedded SQL