From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: Arrays versus 'type constant' syntax |
Date: | 1999-07-14 15:58:00 |
Message-ID: | 25800.931967880@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu> writes:
>> 2. Remove "AexprConst ::= Typename Sconst" from the grammar. I do
>> not believe this rule is in SQL92.
> Sorry, this *is* SQL92 syntax.
I've just grepped the SQL92 spec in some detail, and I see noplace
that allows "typename stringconstant". "::" is indeed not standard,
but the only type conversion syntax I see in the spec is
CAST (value AS type)
If I'm missing something, please cite chapter and verse.
>> 3. Simplify the AexprConst rule to only allow a subset of Typename
>> --- it looks like forbidding array types in this context is enough.
>> (You could still write a cast using :: or AS, of course, instead of
>> "int4[3] '{1,2,3}'". The latter has never worked anyway.)
>> I'm leaning to choice #3, but I wonder if anyone has a better idea.
> I don't have a strong opinion about what #3 would introduce as far as
> future constraints.
If "typename stringconstant" actually is standard then we have a
problem, because I would not like to forbid array types in a standard
construct. But the grammar is not LALR(1) in the presence of array
types, so we may not have much choice...
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Lamar Owen | 1999-07-14 16:02:02 | Password redux (was:Re: [HACKERS] Updated TODO list) |
Previous Message | Bernard Frankpitt | 1999-07-14 15:56:04 | Re: [HACKERS] MAX Query length |