Re: PATCH: SET ROLE as connection parameter - Mailing list pgsql-jdbc

From JUNG, Christian
Subject Re: PATCH: SET ROLE as connection parameter
Date
Msg-id 24BB5F92CE3E62419C5A6D5B1A1E0F46028E1B1C@nts58.saarstahl.de
Whole thread Raw
In response to Re: PATCH: SET ROLE as connection parameter  (Kris Jurka <books@ejurka.com>)
Responses Re: PATCH: SET ROLE as connection parameter  (Kris Jurka <books@ejurka.com>)
List pgsql-jdbc
> -----Original Message-----
> From: Kris Jurka [mailto:books@ejurka.com]
> Sent: Wednesday, September 02, 2009 6:30 PM
> To: JUNG, Christian
> Cc: pgsql-jdbc@postgresql.org
> Subject: Re: [JDBC] PATCH: SET ROLE as connection parameter

> 1) Can this be done in the V3 ConnectionFactoryImpl's
sendStartupPacket by
> adding it to the params array?  If so that would save a network
roundtrip
> per connection that used this option.

I'm afraid that setting the role in the startup packet won't work. It's
only possible to change the role if the connection is in transaction
state (as far as I understand the GUC stuff in the backend code
correctly).

> want to support some, but not all of these options.  If we're going to
do
> this one, we should probably bite the bullet and do search_path as
well
> because that's a pretty commonly requested item.

What's your opinion about the implementation?

Should the options be stored in a HashMap and the user be allowed to set
any key-/value-pair (no check if keys are allowed/mistyped, easy to use
new features) or should there be dedicated getter/setter (new features
have to be coded)?


bye
Chris

pgsql-jdbc by date:

Previous
From: Maciek Sakrejda
Date:
Subject: Re: PGStream synchronization
Next
From: Florian Weimer
Date:
Subject: Re: Search content within a bytea field