Skip site navigation (1) Skip section navigation (2)

Re: Basic DOMAIN Support

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Rod Taylor" <rbt(at)zort(dot)ca>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Basic DOMAIN Support
Date: 2002-03-08 04:31:32
Message-ID: 5274.1015561892@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
"Rod Taylor" <rbt(at)zort(dot)ca> writes:
> Changing ColLabel to ColId seems to have corrected the problem but now
> I'm completely confused as to how it works.

Well, you don't really need to know anything about the parsing algorithm
to see that the way you had it was ambiguous.  Consider input
	DEFAULT = foo
If DEFAULT can be a ColLabel, then there are two valid parsings of
this input: one in which foo is reduced to c_expr and one in which
it's reduced to a typename.  That ambiguity is what creates the
shift/reduce conflict.

BTW, I would recommend b_expr not c_expr as the expression nonterminal
to use, if possible.  (Actually, I suspect a_expr would work, in which
case you might as well use it.)

			regards, tom lane

In response to

Responses

pgsql-patches by date

Next:From: Rod TaylorDate: 2002-03-08 04:38:05
Subject: Re: Basic DOMAIN Support
Previous:From: Rod TaylorDate: 2002-03-08 04:21:18
Subject: Domain Support -- another round

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group