Re: [v9.2] Fix Leaky View Problem

Peter Geoghegan <peter@2ndquadrant.com>

From: Peter Geoghegan <peter@2ndquadrant.com>
To: Kohei KaiGai <kaigai@kaigai.gr.jp>
Cc: Robert Haas <robertmhaas@gmail.com>, Noah Misch <noah@leadboat.com>, Kevin Grittner <Kevin.Grittner@wicourts.gov>, Kohei.Kaigai@emea.nec.com, thom@linux.com, pgsql-hackers@postgresql.org, tgl@sss.pgh.pa.us
Date: 2011-10-11T00:19:32Z
Lists: pgsql-hackers
On 10 October 2011 21:28, Kohei KaiGai <kaigai@kaigai.gr.jp> wrote:
> 2011/10/10 Robert Haas <robertmhaas@gmail.com>:
>> It seems really ugly to me to suppose that we need to add a depth
>> field to every single one of these node types.  If you've missed one,
>> then we have a security hole.  If someone else adds another node type
>> later that requires this field and doesn't add it, we have a security
>> hole.  And since all of these depth fields are going to make their way
>> into stored rules, those security holes will require an initdb to fix.
>>
> Indeed, I have to admit this disadvantage from the perspective of code
> maintenance, because it had also been a tough work for me to track
> the depth field in this patch.

Would you consider putting the depth field directly into a generic
superclass node, such as the "Expr" node? Perhaps that approach would
be neater.

-- 
Peter Geoghegan       http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services