pgsql: Add missing ObjectIdGetDatum() in syscache lookup calls for Oids

2023-07-19 Thread Michael Paquier
Add missing ObjectIdGetDatum() in syscache lookup calls for Oids Based on how postgres.h foes the Oid <-> Datum conversion, there is no existing bugs but let's be consistent. 17 spots have been noticed as incorrectly passing down Oids rather than Datums. Aleksander got one, Zhang two and I the r

pgsql: Fix pg_recvlogical upon signal termination

2023-07-19 Thread Michael Paquier
Fix pg_recvlogical upon signal termination When pg_recvlogical needs to abort on a signal like SIGINT/SIGTERM, it is expected to exit cleanly as the code documents. However, the code forgot to clean up the state of the connection before leaving. This would cause the tool to emit messages like "u

pgsql: Doc: move unparenthesized syntaxes for a few commands.

2023-07-19 Thread Nathan Bossart
Doc: move unparenthesized syntaxes for a few commands. Move documentation of the unparenthesized syntaxes for VACUUM, ANALYZE, EXPLAIN, and CLUSTER to the "Compatibility" section of their documentation to improve readability of the preferred, parenthesized syntaxes. Author: Melanie Plageman Discu

pgsql: Rearrange CLUSTER rules in gram.y.

2023-07-19 Thread Nathan Bossart
Rearrange CLUSTER rules in gram.y. This change moves the unparenthesized syntax for CLUSTER to the end of the ClusterStmt rules in preparation for a follow-up commit that will move this syntax to the "Compatibility" section of the CLUSTER documentation. The documentation for the CLUSTER syntaxes

pgsql: Support parenthesized syntax for CLUSTER without a table name.

2023-07-19 Thread Nathan Bossart
Support parenthesized syntax for CLUSTER without a table name. b5913f6120 added a parenthesized syntax for CLUSTER, but it requires specifying a table name. This is unlike commands such as VACUUM and ANALYZE, which do not require specifying a table in the parenthesized syntax. This change resolv

pgsql: Add psql \drg command to display role grants.

2023-07-19 Thread Tom Lane
Add psql \drg command to display role grants. With the addition of INHERIT and SET options for role grants, the historical display of role memberships in \du/\dg is woefully inadequate. Besides those options, there are pre-existing shortcomings that you can't see the ADMIN option nor the grantor.

pgsql: Add psql \drg command to display role grants.

2023-07-19 Thread Tom Lane
Add psql \drg command to display role grants. With the addition of INHERIT and SET options for role grants, the historical display of role memberships in \du/\dg is woefully inadequate. Besides those options, there are pre-existing shortcomings that you can't see the ADMIN option nor the grantor.

pgsql: Doc: improve description of IN and row-constructor comparisons.

2023-07-19 Thread Tom Lane
Doc: improve description of IN and row-constructor comparisons. IN and NOT IN work fine on records and arrays, so just say that they accept "expressions" not "scalar expressions". I think that that phrasing was meant to say that they don't work on set-returning expressions, but that's not the com

pgsql: Doc: improve description of IN and row-constructor comparisons.

2023-07-19 Thread Tom Lane
Doc: improve description of IN and row-constructor comparisons. IN and NOT IN work fine on records and arrays, so just say that they accept "expressions" not "scalar expressions". I think that that phrasing was meant to say that they don't work on set-returning expressions, but that's not the com

pgsql: Doc: improve description of IN and row-constructor comparisons.

2023-07-19 Thread Tom Lane
Doc: improve description of IN and row-constructor comparisons. IN and NOT IN work fine on records and arrays, so just say that they accept "expressions" not "scalar expressions". I think that that phrasing was meant to say that they don't work on set-returning expressions, but that's not the com

pgsql: Doc: improve description of IN and row-constructor comparisons.

2023-07-19 Thread Tom Lane
Doc: improve description of IN and row-constructor comparisons. IN and NOT IN work fine on records and arrays, so just say that they accept "expressions" not "scalar expressions". I think that that phrasing was meant to say that they don't work on set-returning expressions, but that's not the com

pgsql: Doc: improve description of IN and row-constructor comparisons.

2023-07-19 Thread Tom Lane
Doc: improve description of IN and row-constructor comparisons. IN and NOT IN work fine on records and arrays, so just say that they accept "expressions" not "scalar expressions". I think that that phrasing was meant to say that they don't work on set-returning expressions, but that's not the com

pgsql: Doc: improve description of IN and row-constructor comparisons.

2023-07-19 Thread Tom Lane
Doc: improve description of IN and row-constructor comparisons. IN and NOT IN work fine on records and arrays, so just say that they accept "expressions" not "scalar expressions". I think that that phrasing was meant to say that they don't work on set-returning expressions, but that's not the com

pgsql: Doc: improve description of IN and row-constructor comparisons.

2023-07-19 Thread Tom Lane
Doc: improve description of IN and row-constructor comparisons. IN and NOT IN work fine on records and arrays, so just say that they accept "expressions" not "scalar expressions". I think that that phrasing was meant to say that they don't work on set-returning expressions, but that's not the com