From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: info about patch: using parametrised query in psql |
Date: | 2009-12-25 19:06:09 |
Message-ID: | 603c8f070912251106j21fd810eo5626c1423116dcff@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Dec 25, 2009 at 1:41 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
>> there are two quoting styles, so we need two syntax. I proposed
>
>> :[var] and :{var} - for ident quoting and literal quoting.
>> Theoretically we could to use :(var) for bytea escaping.
>
> And if you need a fourth style, you're at a dead end. I don't think
> this is really an improvement over the single-flag-character approach.
> Neither one has got any mnemonic value whatever, unfortunately, but
> at least the flag character method is fairly extensible.
The lack of mnemonic value kind of sucks, but I don't see that Pavel's
style is any more or less extensible than your proposed flag
character. Basically, he's saying that the flag characters will be [
and { and adding a closing delimeter to match. If we do want to go
with a single flag character, maybe it should just be a single or
double quote:
:'foo - quote as a literal
:"foo - quote as an ident
I dunno what to do about bytea-escaping under this framework, though.
...Robert
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-12-25 19:08:26 | Re: ORDER BY clause in aggregate doesn't work well with multi argument aggregates |
Previous Message | Pavel Stehule | 2009-12-25 19:03:07 | Re: ORDER BY clause in aggregate doesn't work well with multi argument aggregates |