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: Remove dead code in ECPGconnect(), and improve documentation.
Date: Thu, 11 Feb 2021 20:06:03 +0000
Message-ID: <E1lAIDz-0003EC-R6@gemulon.postgresql.org> (raw)

Remove dead code in ECPGconnect(), and improve documentation.

The stanza in ECPGconnect() that intended to allow specification of a
Unix socket directory path in place of a port has never executed since
it was committed, nearly two decades ago; the preceding strrchr()
already found the last colon so there cannot be another one.  The lack
of complaints about that is doubtless related to the fact that no
user-facing documentation suggested it was possible.

Rather than try to fix that up, let's just remove the unreachable
code, and instead document the way that does work to write a socket
directory path, namely specifying it as a "host" option.

In support of that, make another pass at clarifying the syntax
documentation for ECPG connection targets, particularly documenting
which things are parsed as identifiers and where to use double quotes.
Rearrange some things that seemed poorly ordered, and fix a couple of
minor doc errors.

Kyotaro Horiguchi, per gripe from Shenhao Wang
(docs changes mostly by me)

Discussion: https://postgr.es/m/ae52a416bbbf459c96bab30b3038e06c@G08CNEXMBPEKD06.g08.fujitsu.local

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/62535cae9723afc48173ba1be65f1c7491813fc2

Modified Files
--------------
doc/src/sgml/ecpg.sgml                | 64 ++++++++++++++++++++++-------------
src/interfaces/ecpg/ecpglib/connect.c | 48 ++++++--------------------
2 files changed, 52 insertions(+), 60 deletions(-)



Message-ID: <E1lAIDz-0003EC-R6@gemulon.postgresql.org>
Permalink:  ../E1lAIDz-0003EC-R6@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lAIDz-0003EC-R6@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Remove dead code in ECPGconnect(), and improve documentation.
  In-Reply-To: <E1lAIDz-0003EC-R6@gemulon.postgresql.org>
  References: <E1lAIDz-0003EC-R6@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