Marc Munro <marc@bloodnok.com> writes:
> I tried to define a policy within an extension but the policy does not
> seem to belong to the extension. Is this the way it is supposed to be?
Yeah, I would expect that.
https://www.postgresql.org/docs/current/extend-extensions.html
says:
The kinds of SQL objects that can be members of an extension are shown
in the description of ALTER EXTENSION. ...
Also notice that while a table can be a member of
an extension, its subsidiary objects such as indexes are not directly
considered members of the extension. ...
An RLS policy is a table "subsidiary object" so it only depends indirectly
on the extension that owns the table.
regards, tom lane