From: | Karl Czajkowski <karlcz(at)isi(dot)edu> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: RLS policy dump/restore failure due to elided type-casts |
Date: | 2016-04-21 01:47:36 |
Message-ID: | 20160421014736.GD7976@moraine.isi.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Apr 20, Tom Lane modulated:
> Karl Czajkowski <karlcz(at)isi(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-04-21 02:17:27 | Re: RLS policy dump/restore failure due to elided type-casts |
Previous Message | Karl Czajkowski | 2016-04-21 01:37:53 | Re: RLS policy dump/restore failure due to elided type-casts |