pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
PGSERVICEFILE as a connection string parameter
7+ messages / 6 participants
[nested] [flat]

* PGSERVICEFILE as a connection string parameter
@ 2017-02-27 05:43 Michael Paquier <michael.paquier@gmail.com>
  2017-02-27 06:03 ` Re: PGSERVICEFILE as a connection string parameter Andres Freund <andres@anarazel.de>
  0 siblings, 1 reply; 7+ messages in thread

From: Michael Paquier @ 2017-02-27 05:43 UTC (permalink / raw)
  To: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>

Hi all,

I bumped into a case where it would have been rather useful to specify
a service file path in a connection string with a service name. In my
case, I have finished by setting up PGSERVICEFILE, but now like
PGPASSFILE I think that being able to define the service file
available as well as a connection parameter would be useful as well.

I am not planning to work on that immediately (there is one day left
for the last CF of PG10!), but I was wondering if people would be
interested in something like that.
So, opinions?
-- 
Michael


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: PGSERVICEFILE as a connection string parameter
  2017-02-27 05:43 PGSERVICEFILE as a connection string parameter Michael Paquier <michael.paquier@gmail.com>
@ 2017-02-27 06:03 ` Andres Freund <andres@anarazel.de>
  2017-02-27 06:14   ` Re: PGSERVICEFILE as a connection string parameter David Fetter <david@fetter.org>
  2017-02-27 15:23   ` Re: PGSERVICEFILE as a connection string parameter Magnus Hagander <magnus@hagander.net>
  0 siblings, 2 replies; 7+ messages in thread

From: Andres Freund @ 2017-02-27 06:03 UTC (permalink / raw)
  To: Michael Paquier <michael.paquier@gmail.com>; +Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>

Hi,

On 2017-02-27 14:43:49 +0900, Michael Paquier wrote:
> I bumped into a case where it would have been rather useful to specify
> a service file path in a connection string with a service name. In my
> case, I have finished by setting up PGSERVICEFILE, but now like
> PGPASSFILE I think that being able to define the service file
> available as well as a connection parameter would be useful as well.
>
> I am not planning to work on that immediately (there is one day left
> for the last CF of PG10!), but I was wondering if people would be
> interested in something like that.

Hm - I'm not sure that's a good idea. service files are a libpq feature,
but connection strings are a bit more universal than just libpq...

Regards,

Andres


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: PGSERVICEFILE as a connection string parameter
  2017-02-27 05:43 PGSERVICEFILE as a connection string parameter Michael Paquier <michael.paquier@gmail.com>
  2017-02-27 06:03 ` Re: PGSERVICEFILE as a connection string parameter Andres Freund <andres@anarazel.de>
@ 2017-02-27 06:14   ` David Fetter <david@fetter.org>
  1 sibling, 0 replies; 7+ messages in thread

From: David Fetter @ 2017-02-27 06:14 UTC (permalink / raw)
  To: Andres Freund <andres@anarazel.de>; +Cc: Michael Paquier <michael.paquier@gmail.com>; PostgreSQL mailing lists <pgsql-hackers@postgresql.org>

On Sun, Feb 26, 2017 at 10:03:40PM -0800, Andres Freund wrote:
> Hi,
> 
> On 2017-02-27 14:43:49 +0900, Michael Paquier wrote:
> > I bumped into a case where it would have been rather useful to
> > specify a service file path in a connection string with a service
> > name. In my case, I have finished by setting up PGSERVICEFILE, but
> > now like PGPASSFILE I think that being able to define the service
> > file available as well as a connection parameter would be useful
> > as well.
> >
> > I am not planning to work on that immediately (there is one day
> > left for the last CF of PG10!), but I was wondering if people
> > would be interested in something like that.
> 
> Hm - I'm not sure that's a good idea. service files are a libpq
> feature, but connection strings are a bit more universal than just
> libpq...

You bring up a salient point.  What say we make pg_services a little
more universal?  I'm guessing that the Java port wouldn't be too
complicated.  It's already well defined.

Best,
David.
-- 
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: PGSERVICEFILE as a connection string parameter
  2017-02-27 05:43 PGSERVICEFILE as a connection string parameter Michael Paquier <michael.paquier@gmail.com>
  2017-02-27 06:03 ` Re: PGSERVICEFILE as a connection string parameter Andres Freund <andres@anarazel.de>
@ 2017-02-27 15:23   ` Magnus Hagander <magnus@hagander.net>
  2017-02-27 16:36     ` Re: [HACKERS] PGSERVICEFILE as a connection string parameter Andres Freund <andres@anarazel.de>
  1 sibling, 1 reply; 7+ messages in thread

From: Magnus Hagander @ 2017-02-27 15:23 UTC (permalink / raw)
  To: Andres Freund <andres@anarazel.de>; +Cc: Michael Paquier <michael.paquier@gmail.com>; PostgreSQL mailing lists <pgsql-hackers@postgresql.org>

On Mon, Feb 27, 2017 at 7:03 AM, Andres Freund <andres@anarazel.de> wrote:

> Hi,
>
> On 2017-02-27 14:43:49 +0900, Michael Paquier wrote:
> > I bumped into a case where it would have been rather useful to specify
> > a service file path in a connection string with a service name. In my
> > case, I have finished by setting up PGSERVICEFILE, but now like
> > PGPASSFILE I think that being able to define the service file
> > available as well as a connection parameter would be useful as well.
> >
> > I am not planning to work on that immediately (there is one day left
> > for the last CF of PG10!), but I was wondering if people would be
> > interested in something like that.
>
> Hm - I'm not sure that's a good idea. service files are a libpq feature,
> but connection strings are a bit more universal than just libpq...
>

That same argument applies to PGPASSFILE, does it not?

Properly implementing PGSERVICEFILE is more complicated though -- as it
requires LDAP support to go there the whole way for example. But it might
not hurt to encourage other drivers (such as jdbc) to support at least the
basic format of pgpass.

-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: [HACKERS] PGSERVICEFILE as a connection string parameter
  2017-02-27 05:43 PGSERVICEFILE as a connection string parameter Michael Paquier <michael.paquier@gmail.com>
  2017-02-27 06:03 ` Re: PGSERVICEFILE as a connection string parameter Andres Freund <andres@anarazel.de>
  2017-02-27 15:23   ` Re: PGSERVICEFILE as a connection string parameter Magnus Hagander <magnus@hagander.net>
@ 2017-02-27 16:36     ` Andres Freund <andres@anarazel.de>
  2017-02-27 18:50       ` Re: [HACKERS] PGSERVICEFILE as a connection string parameter Dave Cramer <pg@fastcrypt.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Andres Freund @ 2017-02-27 16:36 UTC (permalink / raw)
  To: Magnus Hagander <magnus@hagander.net>; pgsql-jdbc@postgresql.org, Shay Rojansky <roji@roji.org>; +Cc: Michael Paquier <michael.paquier@gmail.com>; PostgreSQL mailing lists <pgsql-hackers@postgresql.org>

On 2017-02-27 16:23:46 +0100, Magnus Hagander wrote:
> On Mon, Feb 27, 2017 at 7:03 AM, Andres Freund <andres@anarazel.de> wrote:
> > On 2017-02-27 14:43:49 +0900, Michael Paquier wrote:
> > > I bumped into a case where it would have been rather useful to specify
> > > a service file path in a connection string with a service name. In my
> > > case, I have finished by setting up PGSERVICEFILE, but now like
> > > PGPASSFILE I think that being able to define the service file
> > > available as well as a connection parameter would be useful as well.
> > >
> > > I am not planning to work on that immediately (there is one day left
> > > for the last CF of PG10!), but I was wondering if people would be
> > > interested in something like that.
> >
> > Hm - I'm not sure that's a good idea. service files are a libpq feature,
> > but connection strings are a bit more universal than just libpq...
> >
> 
> That same argument applies to PGPASSFILE, does it not?

It does.  I'm not really convinced it's a good idea to have that as a
full blown parameter, but as you say:

> Properly implementing PGSERVICEFILE is more complicated though -- as it
> requires LDAP support to go there the whole way for example.



> But it might not hurt to encourage other drivers (such as jdbc) to
> support at least the basic format of pgpass.

Probably makes sense to bring in some of the external driver authors
(jdbc, npgsql CCed).

Greetings,

Andres Freund


-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: [HACKERS] PGSERVICEFILE as a connection string parameter
  2017-02-27 05:43 PGSERVICEFILE as a connection string parameter Michael Paquier <michael.paquier@gmail.com>
  2017-02-27 06:03 ` Re: PGSERVICEFILE as a connection string parameter Andres Freund <andres@anarazel.de>
  2017-02-27 15:23   ` Re: PGSERVICEFILE as a connection string parameter Magnus Hagander <magnus@hagander.net>
  2017-02-27 16:36     ` Re: [HACKERS] PGSERVICEFILE as a connection string parameter Andres Freund <andres@anarazel.de>
@ 2017-02-27 18:50       ` Dave Cramer <pg@fastcrypt.com>
  2018-05-28 14:19         ` Re: [JDBC] [HACKERS] PGSERVICEFILE as a connection string parameter Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Dave Cramer @ 2017-02-27 18:50 UTC (permalink / raw)
  To: Andres Freund <andres@anarazel.de>; +Cc: Magnus Hagander <magnus@hagander.net>; pgsql-jdbc; Shay Rojansky <roji@roji.org>; Michael Paquier <michael.paquier@gmail.com>; PostgreSQL mailing lists <pgsql-hackers@postgresql.org>; Vladimir Sitnikov <sitnikov.vladimir@gmail.com>

+Vladimir

On 27 February 2017 at 11:36, Andres Freund <andres@anarazel.de> wrote:

> On 2017-02-27 16:23:46 +0100, Magnus Hagander wrote:
> > On Mon, Feb 27, 2017 at 7:03 AM, Andres Freund <andres@anarazel.de>
> wrote:
> > > On 2017-02-27 14:43:49 +0900, Michael Paquier wrote:
> > > > I bumped into a case where it would have been rather useful to
> specify
> > > > a service file path in a connection string with a service name. In my
> > > > case, I have finished by setting up PGSERVICEFILE, but now like
> > > > PGPASSFILE I think that being able to define the service file
> > > > available as well as a connection parameter would be useful as well.
> > > >
> > > > I am not planning to work on that immediately (there is one day left
> > > > for the last CF of PG10!), but I was wondering if people would be
> > > > interested in something like that.
> > >
> > > Hm - I'm not sure that's a good idea. service files are a libpq
> feature,
> > > but connection strings are a bit more universal than just libpq...
> > >
> >
> > That same argument applies to PGPASSFILE, does it not?
>
> It does.  I'm not really convinced it's a good idea to have that as a
> full blown parameter, but as you say:
>
> > Properly implementing PGSERVICEFILE is more complicated though -- as it
> > requires LDAP support to go there the whole way for example.
>
>
>
> > But it might not hurt to encourage other drivers (such as jdbc) to
> > support at least the basic format of pgpass.
>
> Probably makes sense to bring in some of the external driver authors
> (jdbc, npgsql CCed).
>
> Currently PGPASS is in the users home directory Many JDBC applications are
in much larger apps such as tomcat, etal
this concept is a bit foreign to JDBC. That being said I don't think it's
difficult to implement. Just somewhat harder to specify
for us. psql is rather limited being a command line app which is *usually*
evoked directly from the command line.


Dave Cramer

davec@postgresintl.com
www.postgresintl.com

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: [JDBC] [HACKERS] PGSERVICEFILE as a connection string parameter
  2017-02-27 05:43 PGSERVICEFILE as a connection string parameter Michael Paquier <michael.paquier@gmail.com>
  2017-02-27 06:03 ` Re: PGSERVICEFILE as a connection string parameter Andres Freund <andres@anarazel.de>
  2017-02-27 15:23   ` Re: PGSERVICEFILE as a connection string parameter Magnus Hagander <magnus@hagander.net>
  2017-02-27 16:36     ` Re: [HACKERS] PGSERVICEFILE as a connection string parameter Andres Freund <andres@anarazel.de>
  2017-02-27 18:50       ` Re: [HACKERS] PGSERVICEFILE as a connection string parameter Dave Cramer <pg@fastcrypt.com>
@ 2018-05-28 14:19         ` Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  0 siblings, 0 replies; 7+ messages in thread

From: Vladimir Sitnikov @ 2018-05-28 14:19 UTC (permalink / raw)
  To: David Fetter <david@fetter.org>; +Cc: Andres Freund <andres@anarazel.de>; Magnus Hagander <magnus@hagander.net>; pgsql-jdbc; Shay Rojansky <roji@roji.org>; Michael Paquier <michael.paquier@gmail.com>; PostgreSQL mailing lists <pgsql-hackers@postgresql.org>; Dave Cramer <pg@fastcrypt.com>

David>I'm guessing that the Java port wouldn't be too
complicated.  It's already well defined.

Is encoding defined somewhere for the "service file"?
I don't like the idea of using "a default" very much.

Vladimir

^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2018-05-28 14:19 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-02-27 05:43 PGSERVICEFILE as a connection string parameter Michael Paquier <michael.paquier@gmail.com>
2017-02-27 06:03 ` Andres Freund <andres@anarazel.de>
2017-02-27 06:14   ` David Fetter <david@fetter.org>
2017-02-27 15:23   ` Magnus Hagander <magnus@hagander.net>
2017-02-27 16:36     ` Andres Freund <andres@anarazel.de>
2017-02-27 18:50       ` Dave Cramer <pg@fastcrypt.com>
2018-05-28 14:19         ` Vladimir Sitnikov <sitnikov.vladimir@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox