pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedPossible bug acldefault function
2+ messages / 2 participants
[nested] [flat]
* Possible bug acldefault function
@ 2025-03-19 12:49 Inzamam Shafiq <inzamam.shafiq@hotmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: Inzamam Shafiq @ 2025-03-19 12:49 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Hi Team,
I came across an issue while working with acldefault function on materialized view, which threw an error "ERROR: unrecognized objtype abbreviation: m", when I looked at the source code of acldefault_sql it seems that materialized view case is not handled there, the SQL statement which I was executing is as follows,
`select relname, relowner, acldefault(relkind, relowner) as acl from pg_class where relkind in ('r', 'p', 'v', 'm');`
Please note that the value of relacl column in pg_class is NULL, upon assigning the permission explicitly the error goes away.
I'm not sure if it is truly a bug or I have some misunderstanding about the function.
Your guidance will be helpful to get better understanding of the issue.
Thank you.
Get Outlook for Android<https://aka.ms/AAb9ysg;
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Possible bug acldefault function
@ 2025-03-19 15:45 Tom Lane <tgl@sss.pgh.pa.us>
parent: Inzamam Shafiq <inzamam.shafiq@hotmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2025-03-19 15:45 UTC (permalink / raw)
To: Inzamam Shafiq <inzamam.shafiq@hotmail.com>; +Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Inzamam Shafiq <inzamam.shafiq@hotmail.com> writes:
> I came across an issue while working with acldefault function on materialized view, which threw an error "ERROR: unrecognized objtype abbreviation: m", when I looked at the source code of acldefault_sql it seems that materialized view case is not handled there, the SQL statement which I was executing is as follows,
No, acldefault doesn't consider 'm' to be valid input, because
materialized views are not a distinct kind of object for ACL purposes;
they're just relations (tables), and have relation-y privileges.
In fact, none of the object type codes accepted by acldefault_sql
are relkind values, except for the accidental overlap of 'r' with
the relkind for plain tables.
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2025-03-19 15:45 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-03-19 12:49 Possible bug acldefault function Inzamam Shafiq <inzamam.shafiq@hotmail.com>
2025-03-19 15:45 ` Tom Lane <tgl@sss.pgh.pa.us>
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