Re: massive quotes?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: massive quotes?
Дата
Msg-id 28707.1062419827@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: massive quotes?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: massive quotes?  (Andrew Dunstan <andrew@dunslane.net>)
Re: massive quotes?  (Andreas Pflug <pgadmin@pse-consulting.de>)
Re: massive quotes?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Let me jump in --- there is the issue of how to prevent the backend from
> running the query through the lexer/parser.  The cleanest idea presented
> was:
> [snip]

That's the same idea that was being discussed in this thread.  I was
trying to remind people of the existence of prior discussion with
different (and IMHO better) ideas.

> The interesting thing I missed at first viewing was that there is a
> semicolon after the first line.  This allows the backend to go into a
> COPY-like mode where the client can pass lines to the backend bypassing
> the lexer/parser.

What I don't like about this scheme is that it requires mods on both the
backend and client sides, to solve a problem that could be solved as
well or better (and definitely more simply) on the client side alone.
People are being misled by considering only psql, which is so stupid
that it might actually not need any change to be used with a COPY-based
function definition mode.  I doubt that is true of any other client.
For a client that actually understands it's doing a function definition,
this is *not* simpler nor better.  Instead of running a
string-literal-quotify transformation on the function text (which you
must admit is trivial), the client has to support switching into the
COPY protocol.  That's not simpler.  Add in any meaningful error
recovery (what do you do if the backend doesn't switch into COPY mode?)
and it's substantially more complex.
        regards, tom lane


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

Предыдущее
От: ohp@pyrenet.fr
Дата:
Сообщение: Re: pg_dump bug?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Preliminary notes about hash index concurrency (long)