Re: massive quotes?

From: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Postgresql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: massive quotes?
Date: 2003-09-01 14:42:34
Message-ID: 3F535ADA.9080805@pse-consulting.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2003-09-01 14:50:24 Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)
Previous Message Andrew Dunstan 2003-09-01 14:26:51 Re: massive quotes?