On Fri, Dec 25, 2009 at 1:41 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Pavel Stehule <pavel.stehule@gmail.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