Skip to content

Add support for create view options (security_invoker, etc) #432

@hiemanshu

Description

@hiemanshu

Since Postgres 15, views support security_invoker (and a few other options) https://www.depesz.com/2022/03/22/waiting-for-postgresql-15-add-support-for-security-invoker-views/ and looks like there's currently no support to do that. I'd love to have a simple API for create_view to be able to specify view options, doing something like this:

create_view :user_profile_accesses, security_invoker: true

Do you have any plans on working on this? If not I'm happy to pick it up and add it. Would love to get on the same page about what the API would look like.

We use RLS, and want to use views + RLS, and security_invoker is required, because views use the access of the view owenr, rather than the view invoker if security_invoker is not set to true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions