On Thu, Jan 12, 2023 at 10:34 AM Pavel Stehule <pavel.stehule@xxxxxxxxx> wrote:
čt 12. 1. 2023 v 18:25 odesílatel Ron <ronljohnsonjr@xxxxxxxxx> napsal:
Removing "\\exec" from the statement, and appending -c "\\gexec" to the psql
command technically worked, but did not run the commands.I don't know why, but \g* commands don't work from the -c option. But in this case it is not necessary
Well, the -c option states:
command must be either a command string that is completely parsable by the server (i.e., it contains no psql-specific features), or a single backslash command. Thus you cannot mix SQL and psql meta-commands within a -c option.
Thus any meta-command that interacts with server-parsed SQL is rendered useless in -c
David J.