Re: Comments on adding more connection URL parameters.

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: Barry Lind <blind(at)xythos(dot)com>, pgsql-jdbc(at)postgresql(dot)org, g(dot)tomassoni(at)libero(dot)it
Subject: Re: Comments on adding more connection URL parameters.
Date: 2004-02-04 22:57:34
Message-ID: 402178DE.6070304@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Kris Jurka wrote:
>
> On Wed, 4 Feb 2004, Oliver Jowett wrote:
>
>
>>One issue with the DataSource mapping is that it gets harder to support
>>a whole family of parameters (e.g. the guc_ prefix suggested) in one go,
>>as we need to know the exact set of parameters we support at compile
>>time so we can declare the necessary accessor methods. Maybe we could
>>provide a catchall accessor (setExtraParameters()?) that takes a
>>Properties object or similar.
>
>
> Yes, supporting all GUC options is something we certainly wouldn't want to
> do by providing a method for each one. Especially since different server
> versions have different options and syntax. I imagine setGUC(String name,
> String value) would be sufficient. I suppose also we would have to be
> aware of GUC options that the driver sets itself (like datestyle and
> client_encoding) to ensure that these are not overwritten.

DataSource accessors are meant to follow the JavaBeans property model. I
don't think that lets you do two-parameter accessors (the only exception
is "indexed accessors" that take (int, othertype)), which is why I
suggested passing a Properties object originally. We could pass a single
String[][] argument but that seems a bit nasty and less likely to be
supported by a generic app using introspection.. even using Properties
is a bit dodgy here.

-O

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message shyam s sunder 2004-02-05 12:13:25 java help
Previous Message Curtis Stanford 2004-02-04 21:59:07 Postgresql 7.4.1 and JDBC setFetchSize