From: | Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com> |
---|---|
To: | Genya <genyap(at)online(dot)ua> |
Cc: | List <pgsql-jdbc(at)postgresql(dot)org>, Dave Cramer <pg(at)fastcrypt(dot)com> |
Subject: | Re: Timestamp parameter gets sent as date |
Date: | 2017-09-25 08:13:07 |
Message-ID: | CAB=Je-EHbENUQm0C9BFX3cCmT1bEMaw0+UxVAT-pzA7=D1tdcg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
>Debugger always has shown date parameter set as 2017-01-10 16:45:00+02 so
time zone was present (though I don't use it)
>Still don't understand why it's happening SOMETIMES (not always), seems
like a bug ?
Suppose the statement is "select function(?)".
In this case pgjdbc has no clue if backend wants "with time zone" or
"without time zone".
This is why pgjdbc passes the timestamp as string with timezone info like
"2017-01-10 16:45:00+02".
In case backend wants "with time zone" it uses the timezone from the
string, and in case backend wants "without time zone" it just silently
ignores the timezone.
Regarding "sometimes", I've no idea (yet).
>it does not log anything when the application is up. Is it Spring related ?
I've no idea. A reproducer would probably help to analyze the issue.
Vladimir
From | Date | Subject | |
---|---|---|---|
Next Message | Vladimir Sitnikov | 2017-09-25 08:20:16 | Re: Reading and writing off-heap data |
Previous Message | Tom Dunstan | 2017-09-25 08:06:01 | Re: Reading and writing off-heap data |