Re: InitPostgres and flatfiles question

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: InitPostgres and flatfiles question
Дата
Msg-id 9236.1167968298@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: InitPostgres and flatfiles question  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: InitPostgres and flatfiles question  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> Tom Lane wrote:
>> Markus Schiltknecht <markus@bluegap.ch> writes:
>>> Is there a good reason to not let psql -c behave exactly like psql from 
>>> STDIN?
>> 
>> Backwards compatibility, mostly --- there seems to be a considerable
>> risk of subtly breaking people's scripts if we change the transactional
>> boundaries for psql -c commands.

> True, but if we keep hitting people who don't expect this behavior, I
> wonder if we should just fix it and mention it in the release notes.

One other point is that if we change -c's behavior, there won't be
*any* way to submit multiple queries in a single PQexec using plain
psql --- it will require hacking up a special test program using
libpq directly.  Unless we have plans to obsolete
multi-queries-per-PQexec altogether, this doesn't seem like a good idea.

OTOH, you could argue that forbidding multiple queries in one PQexec
isn't a bad idea; it would provide an additional defense against
SQL-injection attacks.  We did that already in the "extended" query
protocol and I've not heard many complaints.

I'd be willing to buy into doing both together, perhaps.
        regards, tom lane


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

Предыдущее
От: "Andrew Dunstan"
Дата:
Сообщение: Re: ideas for auto-processing patches
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: InitPostgres and flatfiles question