pg.ddx.io  pgsql-pkg-debian@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christoph Berg <myon@debian.org>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andres Freund <andres@anarazel.de>
Cc: Tatsuo Ishii <ishii@sraoss.co.jp>
Cc: Andreas Karlsson <andreas@proxel.se>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: eldmannen@gmail.com, mark.kirkwood@catalyst.net.nz, Michael Paquier <michael@paquier.xyz>
Cc: Chris Travers <chris.travers@adjust.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Euler Taveira <euler@timbira.com.br>
Cc: rjuju123@gmail.com, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: PostgreSQL pollutes the file system
Date: Fri, 29 Mar 2019 20:38:54 +0100
Message-ID: <20190329193854.GC19154@msg.df7cb.de> (raw)
In-Reply-To: <CAFj8pRAFpZcDGL5i1wMQiHZ43y5Qd=22=+2vTCFOrak_mrUxjw@mail.gmail.com>
References: <20190327142657.GC17983@development>
	<375ea28a-2e8c-9954-66b1-bd0a3ff657f5@proxel.se>
	<18182.1553697687@sss.pgh.pa.us>
	<20190329.100407.1159785913847835944.t-ishii@sraoss.co.jp>
	<20190329152557.GI20294@msg.df7cb.de>
	<24256.1553874086@sss.pgh.pa.us>
	<20190329155121.5zyoahgh4i2r4ayl@alap3.anarazel.de>
	<19517.1553876700@sss.pgh.pa.us>
	<20190329185031.GA19154@msg.df7cb.de>
	<CAFj8pRAFpZcDGL5i1wMQiHZ43y5Qd=22=+2vTCFOrak_mrUxjw@mail.gmail.com>

Re: Pavel Stehule 2019-03-29 <CAFj8pRAFpZcDGL5i1wMQiHZ43y5Qd=22=+2vTCFOrak_mrUxjw@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





view thread (113+ messages)  latest in thread

Message-ID: <20190329193854.GC19154@msg.df7cb.de>
Permalink:  ../20190329193854.GC19154@msg.df7cb.de/
Also on:    postgresql.org/message-id/20190329193854.GC19154@msg.df7cb.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-pkg-debian@postgresql.org
  Cc: myon@debian.org, pavel.stehule@gmail.com, tgl@sss.pgh.pa.us, andres@anarazel.de, ishii@sraoss.co.jp, andreas@proxel.se, tomas.vondra@2ndquadrant.com, michael@paquier.xyz, chris.travers@adjust.com, alvherre@2ndquadrant.com, euler@timbira.com.br, pgsql-hackers@lists.postgresql.org
  Subject: Re: PostgreSQL pollutes the file system
  In-Reply-To: <20190329193854.GC19154@msg.df7cb.de>
  References: <20190327142657.GC17983@development> <375ea28a-2e8c-9954-66b1-bd0a3ff657f5@proxel.se> <18182.1553697687@sss.pgh.pa.us> <20190329.100407.1159785913847835944.t-ishii@sraoss.co.jp> <20190329152557.GI20294@msg.df7cb.de> <24256.1553874086@sss.pgh.pa.us> <20190329155121.5zyoahgh4i2r4ayl@alap3.anarazel.de> <19517.1553876700@sss.pgh.pa.us> <20190329185031.GA19154@msg.df7cb.de> <CAFj8pRAFpZcDGL5i1wMQiHZ43y5Qd=22=+2vTCFOrak_mrUxjw@mail.gmail.com> <20190329193854.GC19154@msg.df7cb.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox