Thread
Commits
-
Doc: remove misleading info about ecpg's CONNECT/DISCONNECT DEFAULT.
- bddc2f748037 17.0 landed
- d76606f077c3 16.1 landed
- c45a45fedbcf 12.17 landed
- 9e8a18d692a9 11.22 landed
- 90fb0d11f2de 13.13 landed
- 733e99de4ec7 15.5 landed
- 70b59a272857 14.10 landed
-
Discrepancy between the documentation and the implementation
The Post Office <noreply@postgresql.org> — 2023-10-25T15:20:11Z
The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/16/ecpg-sql-set-connection.html Description: 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 ? The documentation is kinda misleading, in its current form. Or is there a limitation with ECPG, which prevents the use of DEFAULT, while it would work with other tools ? (This is written in the same way for numerous Postgres versions, it's not limited to version 15) Regards, Sylvain FRANDAZ
-
Re: Discrepancy between the documentation and the implementation
Tom Lane <tgl@sss.pgh.pa.us> — 2023-10-25T18:31:54Z
PG Doc comments form <noreply@postgresql.org> 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