I have some psql scripts that i can invoke with a psql variable.
$ cat myscript.sql
select * from images where id = :'imgid';
$ psql
> \set imgid 123
> \i myscript.sql
...query result...
This doesn't appear supported on pgcli, unless I've missed it somehow. Is there any chance for this to be supported, or another way I could do it?
My real use-case is that the sql script has many queries, all of which are printed out. If the named queries system could execute more than one query at a time, it would be ideal, since that has an arguments system.
Your environment
[x] Please provide your OS and version information.
Description
I have some psql scripts that i can invoke with a psql variable.
This doesn't appear supported on pgcli, unless I've missed it somehow. Is there any chance for this to be supported, or another way I could do it?
My real use-case is that the sql script has many queries, all of which are printed out. If the
named queries
system could execute more than one query at a time, it would be ideal, since that has an arguments system.Your environment
pip freeze
command.Thanks so much, this is an awesome project!