Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y29Dw-0004gQ-1B for pgsql-docs@arkaria.postgresql.org; Sat, 20 Dec 2014 01:52:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Y29Du-0006eW-QT for pgsql-docs@arkaria.postgresql.org; Sat, 20 Dec 2014 01:52:50 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Y29Ds-0006eK-LF for pgsql-docs@postgresql.org; Sat, 20 Dec 2014 01:52:48 +0000 Received: from mail-wg0-x22a.google.com ([2a00:1450:400c:c00::22a]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1Y29Do-0003md-MY for pgsql-docs@postgresql.org; Sat, 20 Dec 2014 01:52:46 +0000 Received: by mail-wg0-f42.google.com with SMTP id k14so2722416wgh.1 for ; Fri, 19 Dec 2014 17:52:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=4IRH1wVV1DN9l2ONIa/x0B6QUCXRv/Qf4knXSeZGiaM=; b=iB7Ko1e5CoxlRetpaPLp42A75FQueBpHlndchaflmCb6DA2p19MKe3xM+CvGzAAXxI 4gbA+fci4HN/ec75hy5Nz+VVkimkdWvZVN7vzREZHCnZva80rlO/3pLo80TKsMfB6Eir aAv4G0gX8Gzb/szQTsjqEiWlnRf+7URZEZ2aPVl1fZrN0325moAtnTY9QBkiibAQAPV2 zpcJOSU2iAB+weXZS1bfnUJixEfdLorXG6oF83D/0NmHUE8ZYjahwN55xX+LGSyfYwKA s5DeUGBc3CVJotI9ViLK27YC5LXRHZ7cKOBjD1WJwzh0XT5Ko7ICYb6zwvQdwt8zDbsM Ms3A== MIME-Version: 1.0 X-Received: by 10.180.74.236 with SMTP id x12mr11006990wiv.40.1419040362128; Fri, 19 Dec 2014 17:52:42 -0800 (PST) Received: by 10.216.87.68 with HTTP; Fri, 19 Dec 2014 17:52:42 -0800 (PST) Date: Fri, 19 Dec 2014 18:52:42 -0700 Message-ID: Subject: libpq "service" parameter not documented as not allowed inside a pg_service file From: David Johnston To: "pgsql-docs@postgresql.org" Content-Type: multipart/alternative; boundary=f46d043c7edcb4e95f050a9c14ff X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org --f46d043c7edcb4e95f050a9c14ff Content-Type: text/plain; charset=UTF-8 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. --f46d043c7edcb4e95f050a9c14ff Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
While the fact that you cannot do:

[service_template]
host=3Dxxx.xxx.xxx.xxx

[se= rvice_db1]
dbname=3Ddb1
service=3Dservice_template
=
seems obvious there is nothing in the documentation that says = this is prohibited; and attempting a simple alias entry:

=
[realentry]
user=3Dnot_system_user
dbname=3Dwhatever

[aliasentry]
service=3Drealentry

psql "service=3Daliasentry"

results in= the error:

FATAL: =C2=A0role "system-user" = does not exist

Version 9.3

SIDE N= OTE: between the "FATAL:" and the word "role" are two s= paces instead of what probably should be one.

Anyway,=


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

=
and one of those parameters is "service"<= /div>

<= div class=3D"gmail_default" style>
I would suggest:

<= div class=3D"gmail_default" style>"connection parameters; see Section 31.1.2 for a list but note that= you may not include the "service" parameter within the pg_servic= e file (i.e., aliases are not allowed).


David J.=

P.S.

Any chance on actually making this work?=C2=A0 The recent commen= t about "\c service=3Dname" not working properly seems to fall in= to the same category so maybe fix them both at the same time - though the o= ther issue is probably more of a bug while this is a feature request (unles= s the interplay is non-trivial)...

I&#= 39;m going to link to this post and add a comment to that thread.

--f46d043c7edcb4e95f050a9c14ff--