Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
>> I can't see any way to handle parameterized types without extending the
>> grammar individually for each one --- otherwise it's too hard to tell
>> them apart from function calls.
> Disallow it in table definitions, but allow it in domain definitions...
Those two cases are not hard, because in those scenarios the parser
knows it is expecting a type specification. The real problem is this
syntax for typed literals: typename 'string'
which occurs in ordinary expressions. So when you see "name(" you
aren't real sure if you're seeing the start of a function call or the
start of a typed-literal construct. And it's very hard to postpone that
decision until you see what comes after the right paren.
regards, tom lane