Re: [patch] [doc] Minor variable related cleanup and rewording of plpgsql docs - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: [patch] [doc] Minor variable related cleanup and rewording of plpgsql docs
Date
Msg-id CAFj8pRBXcqftkfXyQ9sjHP2uBtyca_V+Oak_3o8gtpVYeSk4Lw@mail.gmail.com
Whole thread Raw
In response to [patch] [doc] Minor variable related cleanup and rewording of plpgsql docs  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: [patch] [doc] Minor variable related cleanup and rewording of plpgsql docs  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-hackers


čt 26. 11. 2020 v 6:41 odesílatel David G. Johnston <david.g.johnston@gmail.com> napsal:
Hackers,

Bug # 16519 [1] is another report of confusion regarding trying to use parameters in improper locations - specifically the SET ROLE command within pl/pgsql.  I'm re-attaching the doc patch and am adding it to the commitfest.

I checked this patch, and I think so it is correct - my comments are just about enhancing by some examples

Maybe for following sentence the some examples can be practical

+     If the SQL command being executed is incapable of returning a result
+     it does not accept query parameters.
     </para>

+ it does not accept query parameters (usually DDL commands like CREATE TABLE, DROP TABLE, ALTER ... ).

+    Query parameters will only be substituted in places where syntactically allowed
+    (in particular, identifiers can never be replaced with a query parameter.)
+    As an extreme case, consider this example of poor programming style:

In this case, I miss the more precious specification of identifiers

+    (in particular, SQL identifiers (like schema, table, column names) can never be replaced with a query parameter.)

Regards

Pavel


pgsql-hackers by date:

Previous
From: Sergei Kornilov
Date:
Subject: Re: Stronger safeguard for archive recovery not to miss data
Next
From: "osumi.takamichi@fujitsu.com"
Date:
Subject: RE: Stronger safeguard for archive recovery not to miss data