jian he <[email protected]> writes:
> +CREATE TABLE coll_t1(LIKE coll_t INCLUDING POLICIES);

I want to take a step back and debate whether such a feature is
a good idea at all.

What's bothering me in particular is that CREATE TABLE LIKE does
not (and cannot be told to) copy the source's ownership or ACL
permissions.  Does it make sense to copy RLS policies while
not copying those tightly-associated properties?  I'm inclined to
think not.

(And no, I'd not look favorably on a response that proposes to fix
that by adding the ability to copy ownership/permissions.  There
are probably security problems in such an idea.)

I'm especially distressed that this would presumably cause
INCLUDING ALL to copy policies too.  I think the odds of that
usually being the right thing would be small.

                        regards, tom lane


Reply via email to