From: | Christoph Berg <myon(at)debian(dot)org> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>, Andreas Karlsson <andreas(at)proxel(dot)se>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, eldmannen(at)gmail(dot)com, mark(dot)kirkwood(at)catalyst(dot)net(dot)nz, Michael Paquier <michael(at)paquier(dot)xyz>, Chris Travers <chris(dot)travers(at)adjust(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Euler Taveira <euler(at)timbira(dot)com(dot)br>, rjuju123(at)gmail(dot)com, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: PostgreSQL pollutes the file system |
Date: | 2019-03-29 19:38:54 |
Message-ID: | 20190329193854.GC19154@msg.df7cb.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-pkg-debian |
Re: Pavel Stehule 2019-03-29 <CAFj8pRAFpZcDGL5i1wMQiHZ43y5Qd=22=+2vTCFOrak_mrUxjw(at)mail(dot)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Jesper Pedersen | 2019-03-29 19:39:53 | Re: partitioned tables referenced by FKs |
Previous Message | Christoph Berg | 2019-03-29 19:35:26 | Re: Enable data checksums by default |
From | Date | Subject | |
---|---|---|---|
Next Message | Chapman Flack | 2019-03-29 19:41:48 | Re: PostgreSQL pollutes the file system |
Previous Message | Joe Conway | 2019-03-29 19:32:57 | Re: PostgreSQL pollutes the file system |