From: Karl Czajkowski <karlcz@isi.edu>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-general@postgresql.org
Subject: Re: RLS policy dump/restore failure due to elided type-casts
Date: Wed, 20 Apr 2016 18:47:36 -0700
Message-ID: <20160421014736.GD7976@moraine.isi.edu> (raw)
In-Reply-To: <18967.1461201440@sss.pgh.pa.us>
References: <20160421001832.GB7976@moraine.isi.edu>
<18967.1461201440@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>
On Apr 20, Tom Lane modulated:
> Karl Czajkowski <karlcz@isi.edu> writes:
> > CREATE POLICY delete_stuff ON stuff
> > FOR DELETE USING ('example attribute value' = ANY ( ((SELECT current_attributes()))::text[] ));
>
> Just out of curiosity, why are you doing it like that, and not simply
>
> USING ('example attribute value' = ANY (current_attributes()))
>
> It seems like you're going out of your way to complicate matters.
>
> regards, tom lane
>
Going out of my way to complicate matters is my specialty. :-)
I spend more of my time writing programs that generate and transform
SQL from domain-specific languages, rather than writing SQL by
hand. In this case, I think I composed the subquery reflexively
without thinking that there is a more direct idiom for this case...
Karl
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: karlcz@isi.edu, tgl@sss.pgh.pa.us
Subject: Re: RLS policy dump/restore failure due to elided type-casts
In-Reply-To: <20160421014736.GD7976@moraine.isi.edu>
References: <20160421001832.GB7976@moraine.isi.edu> <18967.1461201440@sss.pgh.pa.us> <20160421014736.GD7976@moraine.isi.edu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox