public inbox for [email protected]  
help / color / mirror / Atom feed
From: David Johnston <[email protected]>
To: [email protected] <[email protected]>
Subject: libpq "service" parameter not documented as not allowed inside a pg_service file
Date: Fri, 19 Dec 2014 18:52:42 -0700
Message-ID: <CAKFQuwbySWHzg1ogkwJg+rXK_Jgy5t8ren+iy7L_ms5Y=Yq5PQ@mail.gmail.com> (raw)
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgsql-docs>

While the fact that you cannot do:

[service_template]
host=xxx.xxx.xxx.xxx

[service_db1]
dbname=db1
service=service_template

seems obvious there is nothing in the documentation that says this is
prohibited; and attempting a simple alias entry:

[realentry]
user=not_system_user
dbname=whatever

[aliasentry]
service=realentry

psql "service=aliasentry"

results in the error:

FATAL:  role "system-user" does not exist

Version 9.3

SIDE NOTE: between the "FATAL:" and the word "role" are two spaces instead
of what probably should be one.

Anyway,

http://www.postgresql.org/docs/9.4/static/libpq-pgservice.html

says that "[...] and the parameters are connection parameters; [...]

and one of those parameters is "service"

http://www.postgresql.org/docs/9.4/static/libpq-connect.html#LIBPQ-PARAMKEYWORDS

I would suggest:

"connection parameters; see Section 31.1.2 for a list but note that you may
not include the "service" parameter within the pg_service file (i.e.,
aliases are not allowed).

Thoughts?

David J.

P.S.

Any chance on actually making this work?  The recent comment about "\c
service=name" not working properly seems to fall into the same category so
maybe fix them both at the same time - though the other issue is probably
more of a bug while this is a feature request (unless the interplay is
non-trivial)...

I'm going to link to this post and add a comment to that thread.


view thread (3+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: libpq "service" parameter not documented as not allowed inside a pg_service file
  In-Reply-To: <CAKFQuwbySWHzg1ogkwJg+rXK_Jgy5t8ren+iy7L_ms5Y=Yq5PQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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