pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Doc: remove misleading info about ecpg's CONNECT/DISCONNECT DEFA
Date: Wed, 25 Oct 2023 21:35:18 +0000
Message-ID: <E1qvlX3-002Jkj-Kd@gemulon.postgresql.org> (raw)

Doc: remove misleading info about ecpg's CONNECT/DISCONNECT DEFAULT.

As far as I can see, ecpg has no notion of a "default" open
connection.  You can do "CONNECT TO DEFAULT" but that just specifies
letting libpq use all its default connection parameters --- the
resulting connection is not special subsequently.  In particular,
SET CONNECTION = DEFAULT and DISCONNECT DEFAULT simply act on a
connection named DEFAULT, if you've made one; they do not have
special lookup rules.  But the documentation of these commands
makes it look like they do.

Simplest fix, I think, is just to remove the paras suggesting that
DEFAULT is special here.

Also, SET CONNECTION *does* have one special lookup rule, which
is that it recognizes CURRENT as an alias for the currently selected
connection.  SET CONNECTION = CURRENT is a no-op, so it's pretty
useless, but nonetheless it does something different from selecting
a connection by name; so we'd better document it.

Per report from Sylvain Frandaz.  Back-patch to all supported
versions.

Discussion: https://postgr.es/m/169824721149.1769274.1553568436817652238@wrigleys.postgresql.org

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/c45a45fedbcffecfcd318a0a9349d3e1bbfb5e49

Modified Files
--------------
doc/src/sgml/ecpg.sgml | 22 ++--------------------
1 file changed, 2 insertions(+), 20 deletions(-)



view thread (7+ messages)

Message-ID: <E1qvlX3-002Jkj-Kd@gemulon.postgresql.org>
Permalink:  ../E1qvlX3-002Jkj-Kd@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1qvlX3-002Jkj-Kd@gemulon.postgresql.org

 · 

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: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Doc: remove misleading info about ecpg's CONNECT/DISCONNECT DEFA
  In-Reply-To: <E1qvlX3-002Jkj-Kd@gemulon.postgresql.org>

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

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