pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Discrepancy between the documentation and the implementation
2+ messages / 2 participants
[nested] [flat]

* Discrepancy between the documentation and the implementation
@ 2023-10-25 15:20  PG Doc comments form <noreply@postgresql.org>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Doc comments form @ 2023-10-25 15:20 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org; +Cc: elkzwix@gmail.com

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


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Discrepancy between the documentation and the implementation
@ 2023-10-25 18:31  Tom Lane <tgl@sss.pgh.pa.us>
  parent: PG Doc comments form <noreply@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2023-10-25 18:31 UTC (permalink / raw)
  To: elkzwix@gmail.com; +Cc: pgsql-docs@lists.postgresql.org

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





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2023-10-25 18:31 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-10-25 15:20 Discrepancy between the documentation and the implementation PG Doc comments form <noreply@postgresql.org>
2023-10-25 18:31 ` Tom Lane <tgl@sss.pgh.pa.us>

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