Re: Add SECURITY_INVOKER_VIEWS option to CREATE DATABASE - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: Add SECURITY_INVOKER_VIEWS option to CREATE DATABASE
Date
Msg-id CAKFQuwZh0SQdTq+M5umB2Sy1ORNEwMqgL5cpfmEW_B3_iYXQoQ@mail.gmail.com
Whole thread Raw
In response to Re: Add SECURITY_INVOKER_VIEWS option to CREATE DATABASE  (Steve Chavez <steve@supabase.io>)
List pgsql-hackers
On Wed, Jan 28, 2026 at 12:19 PM Steve Chavez <steve@supabase.io> wrote:
> I’d be more inclined to change this incompatibility than try to affect action at a distance with a database setting.  

Could we instead have a shortcut for view creation like `CREATE SECURE VIEW` (would be the same as WITH (security_invoker = true)`) ? This at least makes it harder to forget specifying the option and also denotes that by default views are insecure (since they're most likely created by security_definer=superuser)


Please don't top-post.

Inventing alternative syntax with the same fundamental issue, just an arguably different failure threshold, is unappealing.

David J.

pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: A few pg_locale.c fixes
Next
From: Laurenz Albe
Date:
Subject: Re: Add SECURITY_INVOKER_VIEWS option to CREATE DATABASE