pgsql: Fix missed lock acquisition while inlining new-style SQL functio

2021-08-31 Thread Tom Lane
Fix missed lock acquisition while inlining new-style SQL functions. When starting to use a query parsetree loaded from the catalogs, we must begin by applying AcquireRewriteLocks(), to obtain the same relation locks that the parser would have gotten if the query were entered interactively, and to

pgsql: Fix missed lock acquisition while inlining new-style SQL functio

2021-08-31 Thread Tom Lane
Fix missed lock acquisition while inlining new-style SQL functions. When starting to use a query parsetree loaded from the catalogs, we must begin by applying AcquireRewriteLocks(), to obtain the same relation locks that the parser would have gotten if the query were entered interactively, and to