Re: PostgreSQL pollutes the file system

Поиск
Список
Период
Сортировка
От Christoph Berg
Тема Re: PostgreSQL pollutes the file system
Дата
Msg-id 20190329193854.GC19154@msg.df7cb.de
обсуждение исходный текст
Ответ на Re: PostgreSQL pollutes the file system  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Christoph Berg
Дата:
Сообщение: Re: Enable data checksums by default
Следующее
От: Jesper Pedersen
Дата:
Сообщение: Re: partitioned tables referenced by FKs