Re: Pavel Stehule 2019-03-29 <CAFj8pRAFpZcDGL5i1wMQiHZ43y5Qd=22=+2vtcforak_mru...@mail.gmail.com> > > Other idea: If we don't want to reinvent a new tool, how about > > supporting prepared statements in psql? > > > > psql -c 'create user %i' --args 'bob w. space' > > > > Prepared statements cannot be DDL commands.
"Prepared" in the sense of what format() does. (I should have used %I.) > But psql has safe escaping via :"xxx" notation. So some like > > psql -c 'create role :"role"' -v role='my role' ... That's totally horrible to write, get correct, and to read again later. We need something that people can actually use. > But what I know the psql variables are not evaluated for -c query I hate -c. It has so many caveats. Christoph