From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: change_varattnos_of_a_node versus whole-row Vars |
Date: | 2012-06-29 22:54:11 |
Message-ID: | 25375.1341010451@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I wrote:
> change_varattnos_of_a_node(), which is used to adjust expressions
> referencing a parent relation or LIKE source relation to refer to the
> child relation, ignores whole-row Vars (those with attnum zero).
> ...
> My inclination, especially in the back branches, is to just throw error
> if we find a whole-row Var.
> ...
> There are a bunch of other things I don't like about
> change_varattnos_of_a_node, starting with the name, but those gripes are
> in the nature of cosmetics or inadequate error checking and wouldn't
> have any user-visible impact if changed.
Attached is a draft patch that adds error reports for whole-row Vars
and replaces change_varattnos_of_a_node with a more robust function.
The latter makes it kind of a large patch, but it's difficult to make
it a whole lot simpler unless we are willing to have the error messages
say only "cannot convert whole-row table reference", without any
indication of where the problem is. That seems a tad unfriendly to me.
Comments?
regards, tom lane
Attachment | Content-Type | Size |
---|---|---|
reject-whole-row-vars-in-LIKE.patch | text/x-patch | 21.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Farina | 2012-06-29 23:03:40 | Re: Posix Shared Mem patch |
Previous Message | Dimitri Fontaine | 2012-06-29 21:38:15 | Re: Event Triggers reduced, v1 |