pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Marc Munro <marc@bloodnok.com>
To: pgsql-bugs@lists.postgresql.org
Subject: pg_dump No comment for policy
Date: Sun, 16 Feb 2020 13:41:38 -0800
Message-ID: <1581889298.18009.15.camel@bloodnok.com> (raw)

Severity: Low
PG Server: Versions 9.5 and 10.3
pg_dump: version 10.3

I have created a policy with a comment on it.  pg_dump does not dump
the comment.

Here is my entire schema definition:
--------------------------------------------------------------------
    create table rls (
      username text not null,
      details  text not null
    );

    create policy only_owner on rls
      for all
      to session_user
      using (username = user)
      with check (details != 'xyzzy');

    comment on policy only_owner on public.rls is 'Another comment';
--------------------------------------------------------------------

pg_dump extracts the table and policy but not the comment.

I can manually extract the comment with a query:

    select p.polname, 
           quote_literal(obj_description(p.oid, 'pg_policy')) as comment
    from pg_catalog.pg_policy p;

Initially tried with postgres server 9.5.21 running from psql 10.3.
Also
tried with postgres server 10.3 running from psql 10.3.

I am not at all anxious for this to be fixed.  Just thought you should
know.

__
Marc








view thread (3+ messages)  latest in thread

Message-ID: <1581889298.18009.15.camel@bloodnok.com>
Permalink:  ../1581889298.18009.15.camel@bloodnok.com/
Also on:    postgresql.org/message-id/1581889298.18009.15.camel@bloodnok.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: marc@bloodnok.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: pg_dump No comment for policy
  In-Reply-To: <1581889298.18009.15.camel@bloodnok.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox