Re: Arrays versus 'type constant' syntax - Mailing list pgsql-hackers

From Thomas Lockhart
Subject Re: Arrays versus 'type constant' syntax
Date
Msg-id 378CAD94.903C4045@alumni.caltech.edu
Whole thread Raw
In response to Arrays versus 'type constant' syntax  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Arrays versus 'type constant' syntax
List pgsql-hackers
> I can see three ways to proceed:
> 1. Forget about making arrays easier to use.
> 2. Remove "AexprConst ::= Typename Sconst" from the grammar.  I do
> not believe this rule is in SQL92.  However, we've recommended
> constructions like "default text 'now'" often enough that we might
> not be able to get away with that.

Sorry, this *is* SQL92 syntax. The older Postgres syntax using
"::typename" is also supported, but is not standard anything, so I've
been trying to move examples, etc. to the standard syntax when I can.

> 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.
                      - Thomas

-- 
Thomas Lockhart                lockhart@alumni.caltech.edu
South Pasadena, California


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: 6.5.1 release
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Interesting behaviour !