Re: Comments on adding more connection URL parameters.
| От | Oliver Jowett |
|---|---|
| Тема | Re: Comments on adding more connection URL parameters. |
| Дата | |
| Msg-id | 402178DE.6070304@opencloud.com обсуждение исходный текст |
| Ответ на | Re: Comments on adding more connection URL parameters. (Kris Jurka <books@ejurka.com>) |
| Список | 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
В списке pgsql-jdbc по дате отправления: