From: | "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu> |
---|---|
To: | Jan Wieck <jwieck(at)debis(dot)com> |
Cc: | PostgreSQL HACKERS <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] CREATE FUNCTION broken |
Date: | 1998-02-13 13:50:04 |
Message-ID: | 34E44F8C.E358038A@alumni.caltech.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> Someone changed the parser to build a TypeName node on CREATE
> FUNCTION in any case. As a side effect, ALL! functions
> created got the proretset attribute to true. Thus for a
> SELECT the parser wrapped an Iter node around the Expr and
> since singleton functions set isDone the Iter returns no
> tuple up.
Ah. I broke it (though the regression tests did not find the problem). What
I changed was the code in gram.y, which used to just create a string node
for the return type clause _unless_ the return type was a "SETOF type". In
that case a Typename node was created, and the setof attribute was
explicitly set.
What you found is that farther along, the setof attribute was forced to be
true if _any_ Typename node is present.
It looks like your patch will completely fix things, and is better than my
reverting the gram.y code. Can you suggest a small test case to include in
the regression suite?
Unless there are objections from others (with a preference for reverting
the gram.y code) I'll go ahead and apply Jan's patch.
- Tom
From | Date | Subject | |
---|---|---|---|
Next Message | Vadim B. Mikheev | 1998-02-13 13:50:50 | Subselects are in CVS... |
Previous Message | Thomas G. Lockhart | 1998-02-13 13:36:23 | Re: [COMMITTERS] 'pgsql/src/template linux-elf' |