pgsql: Make pg_get_expr() more bulletproof.

2022-01-09 Thread Tom Lane
Make pg_get_expr() more bulletproof. Since this function is defined to accept pg_node_tree values, it could get applied to any nodetree that can appear in a cataloged pg_node_tree column. Some such cases can't be supported --- for example, its API doesn't allow providing referents for more than o

Re: pgsql: Respect permissions within logical replication.

2022-01-09 Thread Jeff Davis
On Sat, 2022-01-08 at 11:56 +0530, Amit Kapila wrote: > One possible reason for this failure could be that the test doesn't > wait for the initial sync to complete after CREATE SUBSCRIPTION which > can allow more than expected operations to be replicated. Also, the > reason it passes in other machi

Re: pgsql: Respect permissions within logical replication.

2022-01-09 Thread Jeff Davis
On Sat, 2022-01-08 at 18:25 +0900, Michael Paquier wrote: > This issue is just caused by the way the subroutines are defined, > meaning that the attached cools down pgperlcritic. Any objections if > I apply that to cool down crake? Jeff, if you wish to do so, please > feel free of course. Thank

pgsql: Prefer $HOME when looking up the current user's home directory.

2022-01-09 Thread Tom Lane
Prefer $HOME when looking up the current user's home directory. When we need to identify the home directory on non-Windows, first consult getenv("HOME"). If that's empty or unset, fall back on our previous method of checking the database. Preferring $HOME allows the user to intentionally point