Re: gexec from command prompt?

2023-01-12 Thread David G. Johnston
On Thu, Jan 12, 2023 at 10:34 AM Pavel Stehule wrote: > > čt 12. 1. 2023 v 18:25 odesílatel Ron 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 d

Re: gexec from command prompt?

2023-01-12 Thread Alvaro Herrera
On 2023-Jan-12, Ron wrote: > Postgresql 12.11 > > This might be more of a bash question, or it might be a psql vs engine > problem. > > I want to run this query using psql from a bash prompt: > select format('SELECT ''%s'', MIN(part_date) FROM %s;', table_name, > table_name) > from dba.table_s

Re: gexec from command prompt?

2023-01-12 Thread Pavel Stehule
čt 12. 1. 2023 v 18:25 odesílatel Ron napsal: > Postgresql 12.11 > > This might be more of a bash question, or it might be a psql vs engine > problem. > > I want to run this query using psql from a bash prompt: > select format('SELECT ''%s'', MIN(part_date) FROM %s;', table_name, > table_name) >

gexec from command prompt?

2023-01-12 Thread Ron
Postgresql 12.11 This might be more of a bash question, or it might be a psql vs engine problem. I want to run this query using psql from a bash prompt: select format('SELECT ''%s'', MIN(part_date) FROM %s;', table_name, table_name) from dba.table_structure order by table_name\gexec Thus, I add