Peter Eisentraut <peter_e@gmx.net> writes:
>> Remember that constants of random types like "line segment" have to
>> start out as character literals
> A constant of type line segment looks like this:
> LSEG 'whatever'
> This is an obvious extension of the standard. (Also note that this is
> *not* a cast.)
Yes it is. On what grounds would you assert that it isn't? Certainly
not on the basis of what comes out of gram.y; all three of these
produce exactly the same parsetree:LSEG 'whatever''whatever'::LSEGCAST('whatever' AS LSEG)
> It seems that for the benefit of a small crowd -- those actually using
> geometric types and being too lazy to type their literals in the above
> manner -- we are creating all sorts of problems for two much larger
> crowds
Au contraire. The real issue here is how to decide which numeric type
to use for an undecorated but numeric-looking literal token. I don't
think that's a non-mainstream problem, and I definitely don't think
that telling the odd-datatype crowd to take a hike will help fix it.
regards, tom lane