这是indexloc提供的服务,不要输入任何密码
Skip to content

Wrong SQL displayed in difference if user create rls policy on the table without column (RM #7637) #5275

@dpage

Description

@dpage

Issue migrated from Redmine: https://redmine.postgresql.org/issues/7637
Originally created by Fahar Abbas at 2022-08-24 07:45:48 UTC.

Build:
Candidate build v6.13

Source:

CREATE TABLE IF NOT EXISTS public.t
(
)
TABLESPACE pg_default;
ALTER TABLE IF EXISTS public.t
OWNER to enterprisedb;
-- POLICY: t
-- DROP POLICY IF EXISTS t ON public.t;
CREATE POLICY t
ON public.t
AS PERMISSIVE
FOR ALL
TO public;

Target:
CREATE TABLE IF NOT EXISTS public.t
(
)
TABLESPACE pg_default;
ALTER TABLE IF EXISTS public.t
OWNER to enterprisedb;
-- POLICY: t
-- DROP POLICY IF EXISTS t ON public.t;
CREATE POLICY t
ON public.t
AS RESTRICTIVE
FOR ALL
TO public;

I am getting the wrong SQL in difference:

DROP POLICY IF EXISTS t ON public.t;
CREATE POLICY t
ON public.t
AS RESTRICTIVE
FOR ALL
TO public;CREATE POLICY t
ON public.t
AS PERMISSIVE
FOR ALL
TO public;

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions