Re: Regression: Problems with Timestamp arguments

From: Lachezar Dobrev <l(dot)dobrev(at)gmail(dot)com>
To: List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Regression: Problems with Timestamp arguments
Date: 2013-09-10 18:00:28
Message-ID: CA+xsaB3UxRJwUq0Kro1CEzuURUj9KkNV5bJfJO+qCDtn6vqReA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

I've made a blunt stab at working around the issue.
The attached patch adds a new parameter to the JDBC URL: timestamp.
The parameter can be wither 'with_timezone' or 'without_timezone'. If
the parameter is missing, or has a different value then the current
behaviour (using Oid.UNSPECIFIED) is exhibited. With the parameters
specified correctly one of the Oid.TIMESTAMP or Oid.TIMESTAMPTZ is
used when sending Timestamp arguments to the server.

I am not sure whether this is the correct way to request new
features/enhancements, or what is the work-flow for accepting patches,
so feel free to scold me.

I believe the patch to be backwards compatible and very
light-weight, but it may deviate from the code formatting and code
practices of the project.

2013/9/10 Lachezar Dobrev <l(dot)dobrev(at)gmail(dot)com>:
> I (believe I) understand the issue.
> May I suggest a parameter to the Connection URL to specify how
> Timestamp is sent to the server.
>
> I am not versed enough to make a patch to hold this proposal, but if
> I must I will try to.
>
> How is this problem «solved» when using protocol version 2?
> Is there a way to degrade certain parts of the protocol?

Attachment Content-Type Size
timestamp.patch application/octet-stream 3.1 KB

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Lachezar Dobrev 2013-09-10 18:02:40 Re: Regression: Problems with Timestamp arguments
Previous Message Tore Halset 2013-09-10 14:27:56 Re: setBlob(int, Blob) with large blob