Re: WITH CHECK and Column-Level Privileges

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Noah Misch <noah(at)leadboat(dot)com>, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WITH CHECK and Column-Level Privileges
Date: 2015-01-24 03:24:31
Message-ID: 20150124032431.GN3854@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro, all,

* Alvaro Herrera (alvherre(at)2ndquadrant(dot)com) wrote:
> Hmm, tough call now that I look it up. This macro depends on
> ResultRelInfo and EState, both of which are in execnodes.h, and also on
> rt_fetch which is in parsetree.h. There is no existing header that
> includes parsetree.h (only .c files), so we would have to add one
> inclusion on some other header file, or create a new header with just
> this definition. None of these sounds real satisfactory (including
> parsetree.h in execnodes.h sounds very bad). Maybe just add a comment
> on both definitions to note that they are dupes of each other? That
> would be more backpatchable that anything else that occurs to me right
> away.

Alright, I've made these changes and backpatched it all the way to 9.0,
and forward-patched it to master and made the changes for RLS too. Note
that the RLS work ended up requiring a bit of refactoring and moving
things into a new utils/rls.c and /rls.h. I also changed a few of the
existing rewrite/rowsecurity.h #include's to be just utils/rls.h, which
seemed like a good idea to do too.

Would certainly appreciate any additional review/comments, especially
since I think Alvaro might be out of pocket for a bit. I'll be going
back over all the diffs myself and checking for any issues too, of
course. Note that things get pretty different as you go back through
the various releases, for example, we didn't have
ExecBuildSlotValueDescriptions until 9.2.

Thanks!

Stephen

Attachment Content-Type Size
fix-leak90_v8.patch text/x-diff 17.7 KB
fix-leak91_v8.patch text/x-diff 18.7 KB
fix-leak92_v8.patch text/x-diff 25.5 KB
fix-leak93_v8.patch text/x-diff 25.4 KB
fix-leak94_v8.patch text/x-diff 27.5 KB
fix-leakmaster_v8.patch text/x-diff 46.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2015-01-24 04:16:17 Re: Parallel Seq Scan
Previous Message Tom Lane 2015-01-23 21:47:30 Unsafe coding in ReorderBufferCommit()