Re: massive quotes?

Поиск
Список
Период
Сортировка
От Andreas Pflug
Тема Re: massive quotes?
Дата
Msg-id 3F535ADA.9080805@pse-consulting.de
обсуждение исходный текст
Ответ на Re: massive quotes?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: massive quotes?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:

>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.
>
This is perfectly true for pgAdmin2/3 and probably most other tools. If 
using the create dialogs from pgAdmin3, you simply don't bother about 
that extra quotes because they are added as appropriate.
Reducing quotes would be helpful for scripts containing function 
definitions, but it's obviously not a good idea to have a client 
executing such a script let it interpret to determine which part goes 
into the query execute interface and which part needs to use another.
Why not regard anything between "AS" and LANGUAGE as source? This would 
prevent the usage of LANGUAGE as a keyword inside the function 
definition, but I can't think of any senseful other use anyway.

Regards,
Andreas




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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: massive quotes?
Следующее
От: Greg Stark
Дата:
Сообщение: Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)