Re: Binary timestamp with without timezone

Поиск
Список
Период
Сортировка
Искать
От
Merlin Moncure
Тема
Re: Binary timestamp with without timezone
Дата
Msg-id
AANLkTinSO_Bb=zMet0sxy1en39qtaA++xOK1G-fB1=NT@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Binary timestamp with without timezone Radosław Smogura <rsmogura@softperience.eu>
Re: Binary timestamp with without timezone Tom Lane <tgl@sss.pgh.pa.us>
Re: Binary timestamp with without timezone Radosław Smogura <rsmogura@softperience.eu>
Re: Binary timestamp with without timezone Tom Lane <tgl@sss.pgh.pa.us>
Re: Binary timestamp with without timezone Radosław Smogura <rsmogura@softperience.eu>
Re: Binary timestamp with without timezone Merlin Moncure <mmoncure@gmail.com>
On Mon, Dec 20, 2010 at 6:29 AM, Radosław Smogura
 wrote:
>
> On Thu, 16 Dec 2010 14:24:27 -0500, Tom Lane  wrote:
>>
>> Radosław Smogura  writes:
>>>
>>> Tom Lane  Thursday 16 December 2010 18:59:56
>>>>
>>>> Radosław Smogura  writes:
>>>>>
>>>>> ... This timestamp must be properly encoded
>>>>> depending if target is WITH TZ or not, but JDBC (and other clients,
>>>>> probably too) doesn't have any knowledge about target type when
>>>>> statement is executed
>>
>>>> Seems like you need to fix *that*.
>>
>>> I don't say it's bad way to send timestamps in text mode. It's good
>>> solution,
>>> because timestamp without tz will silently ignore tz offset, timestamp
>>> with tz
>>> will use offset in calculations if it is there, if no it will use server
>>> TZ.
>>
>> No, what I'm saying is that it's complete folly to be sending binary
>> data for a value you don't know the exact type of.
>
> I know something about value I want to send, but only this it should be a
> timestamp. I don't know if it should be with or without tz.

That's your problem right there, full stop.  If you don't know if your
time is with or without tz, how can you possibly expect the server to
know?  Either send without tz, or grab the time zone from the local
environment and convert to binary timezone tz.  Your issue has
absolutely nothing to do with which protocol you are using.

merlin

В списке pgsql-hackers по дате отправления
От: Robert Haas
Дата:
Сообщение: Re: bug in SignalSomeChildren
От: Dimitri Fontaine
Дата:
FAQ