Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qvifg-006tNG-Am for pgsql-docs@arkaria.postgresql.org; Wed, 25 Oct 2023 18:32:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qvife-006zxH-SB for pgsql-docs@arkaria.postgresql.org; Wed, 25 Oct 2023 18:31:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qvife-006zta-KH for pgsql-docs@lists.postgresql.org; Wed, 25 Oct 2023 18:31:58 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qvifb-002HXQ-Vo for pgsql-docs@lists.postgresql.org; Wed, 25 Oct 2023 18:31:57 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 39PIVsm41009484; Wed, 25 Oct 2023 14:31:54 -0400 From: Tom Lane To: elkzwix@gmail.com cc: pgsql-docs@lists.postgresql.org Subject: Re: Discrepancy between the documentation and the implementation In-reply-to: <169824721149.1769274.1553568436817652238@wrigleys.postgresql.org> References: <169824721149.1769274.1553568436817652238@wrigleys.postgresql.org> Comments: In-reply-to PG Doc comments form message dated "Wed, 25 Oct 2023 15:20:11 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1009482.1698258714.1@sss.pgh.pa.us> Date: Wed, 25 Oct 2023 14:31:54 -0400 Message-ID: <1009483.1698258714@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Doc comments form writes: > In the documentation for Postgres 15, on page > https://www.postgresql.org/docs/15/ecpg-sql-set-connection.html, it states > that one can write: > SET CONNECTION connection_name > And under that, it talks about "connection_name" and DEFAULT, which is > supposed to be used in order to use the "default connection". > However, "SET CONNECTION DEFAULT" is treated by ECPG as a normal connection > name (looking for a connection named "DEFAULT"), not as a special keyword > meaning to go back to using the "default" connection. > Is there something I'm missing there ? I don't see it either. Both that and EXEC SQL DISCONNECT claim that DEFAULT is a specially treated name, but I don't see anything in the underlying code that treats it differently. Perhaps there was an intention to have some such feature but it never got done? Anyway, I don't see anything indicating that there's actually such a concept as "the default connection". I suggest we just remove those paragraphs. What *is* treated specially is CURRENT --- but EXEC SQL SET CONNECTION = CURRENT is effectively a no-op, so it's not very exciting. regards, tom lane