pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feedRefactor recordExtObjInitPriv()
8+ messages / 3 participants
[nested] [flat]
Commits from this thread:
2023-01-17 2a1d7071c4 Refactor recordExtObjInitPriv()
2023-01-17 13b345df64 Remove AggregateRelationId from recordExtObjInitPriv()
* Refactor recordExtObjInitPriv()
@ 2022-12-27 08:56 Peter Eisentraut <peter.eisentraut@enterprisedb.com>
0 siblings, 1 reply; 8+ messages in thread
From: Peter Eisentraut @ 2022-12-27 08:56 UTC (permalink / raw)
To: pgsql-hackers
Another aclchk.c refactoring patch, similar to [0] and [1].
Refactor recordExtObjInitPriv(): Instead of half a dozen of
mostly-duplicate conditional branches, write one common one that can
handle most catalogs. We already have all the information we need, such
as which system catalog corresponds to which catalog table and which
column is the ACL column.
[0]:
https://www.postgresql.org/message-id/95c30f96-4060-2f48-98b5-a4392d3b6066@enterprisedb.com
[1]:
https://www.postgresql.org/message-id/flat/22c7e802-4e7d-8d87-8b71-cba95e6f4bcf%40enterprisedb.com
Attachments:
0001-Refactor-recordExtObjInitPriv.patch (text/plain, 6.3K) download
From 2982380987066d43e4d35db2157f98498a2a3185 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Tue, 27 Dec 2022 09:38:54 +0100
Subject: [PATCH] Refactor recordExtObjInitPriv()
Instead of half a dozen of mostly-duplicate conditional branches,
write one common one that can handle most catalogs. We already have
all the information we need, such as which system catalog corresponds
to which catalog table and which column is the ACL column.
---
src/backend/catalog/aclchk.c | 153 ++---------------------------------
1 file changed, 8 insertions(+), 145 deletions(-)
diff --git a/src/backend/catalog/aclchk.c b/src/backend/catalog/aclchk.c
index cdfd637815..cf18401449 100644
--- a/src/backend/catalog/aclchk.c
+++ b/src/backend/catalog/aclchk.c
@@ -4241,9 +4241,6 @@ recordDependencyOnNewAcl(Oid classId, Oid objectId, int32 objsubId,
*
* For the object passed in, this will record its ACL (if any) and the ACLs of
* any sub-objects (eg: columns) into pg_init_privs.
- *
- * Any new kinds of objects which have ACLs associated with them and can be
- * added to an extension should be added to the if-else tree below.
*/
void
recordExtObjInitPriv(Oid objoid, Oid classoid)
@@ -4336,74 +4333,6 @@ recordExtObjInitPriv(Oid objoid, Oid classoid)
ReleaseSysCache(tuple);
}
- /* pg_foreign_data_wrapper */
- else if (classoid == ForeignDataWrapperRelationId)
- {
- Datum aclDatum;
- bool isNull;
- HeapTuple tuple;
-
- tuple = SearchSysCache1(FOREIGNDATAWRAPPEROID,
- ObjectIdGetDatum(objoid));
- if (!HeapTupleIsValid(tuple))
- elog(ERROR, "cache lookup failed for foreign data wrapper %u",
- objoid);
-
- aclDatum = SysCacheGetAttr(FOREIGNDATAWRAPPEROID, tuple,
- Anum_pg_foreign_data_wrapper_fdwacl,
- &isNull);
-
- /* Add the record, if any, for the top-level object */
- if (!isNull)
- recordExtensionInitPrivWorker(objoid, classoid, 0,
- DatumGetAclP(aclDatum));
-
- ReleaseSysCache(tuple);
- }
- /* pg_foreign_server */
- else if (classoid == ForeignServerRelationId)
- {
- Datum aclDatum;
- bool isNull;
- HeapTuple tuple;
-
- tuple = SearchSysCache1(FOREIGNSERVEROID, ObjectIdGetDatum(objoid));
- if (!HeapTupleIsValid(tuple))
- elog(ERROR, "cache lookup failed for foreign server %u",
- objoid);
-
- aclDatum = SysCacheGetAttr(FOREIGNSERVEROID, tuple,
- Anum_pg_foreign_server_srvacl,
- &isNull);
-
- /* Add the record, if any, for the top-level object */
- if (!isNull)
- recordExtensionInitPrivWorker(objoid, classoid, 0,
- DatumGetAclP(aclDatum));
-
- ReleaseSysCache(tuple);
- }
- /* pg_language */
- else if (classoid == LanguageRelationId)
- {
- Datum aclDatum;
- bool isNull;
- HeapTuple tuple;
-
- tuple = SearchSysCache1(LANGOID, ObjectIdGetDatum(objoid));
- if (!HeapTupleIsValid(tuple))
- elog(ERROR, "cache lookup failed for language %u", objoid);
-
- aclDatum = SysCacheGetAttr(LANGOID, tuple, Anum_pg_language_lanacl,
- &isNull);
-
- /* Add the record, if any, for the top-level object */
- if (!isNull)
- recordExtensionInitPrivWorker(objoid, classoid, 0,
- DatumGetAclP(aclDatum));
-
- ReleaseSysCache(tuple);
- }
/* pg_largeobject_metadata */
else if (classoid == LargeObjectMetadataRelationId)
{
@@ -4446,60 +4375,21 @@ recordExtObjInitPriv(Oid objoid, Oid classoid)
systable_endscan(scan);
}
- /* pg_namespace */
- else if (classoid == NamespaceRelationId)
+ /* This will error on unsupported classoid. */
+ else if (get_object_attnum_acl(classoid))
{
Datum aclDatum;
bool isNull;
HeapTuple tuple;
- tuple = SearchSysCache1(NAMESPACEOID, ObjectIdGetDatum(objoid));
- if (!HeapTupleIsValid(tuple))
- elog(ERROR, "cache lookup failed for schema %u", objoid);
-
- aclDatum = SysCacheGetAttr(NAMESPACEOID, tuple,
- Anum_pg_namespace_nspacl, &isNull);
-
- /* Add the record, if any, for the top-level object */
- if (!isNull)
- recordExtensionInitPrivWorker(objoid, classoid, 0,
- DatumGetAclP(aclDatum));
-
- ReleaseSysCache(tuple);
- }
- /* pg_proc */
- else if (classoid == ProcedureRelationId)
- {
- Datum aclDatum;
- bool isNull;
- HeapTuple tuple;
-
- tuple = SearchSysCache1(PROCOID, ObjectIdGetDatum(objoid));
- if (!HeapTupleIsValid(tuple))
- elog(ERROR, "cache lookup failed for function %u", objoid);
-
- aclDatum = SysCacheGetAttr(PROCOID, tuple, Anum_pg_proc_proacl,
- &isNull);
-
- /* Add the record, if any, for the top-level object */
- if (!isNull)
- recordExtensionInitPrivWorker(objoid, classoid, 0,
- DatumGetAclP(aclDatum));
-
- ReleaseSysCache(tuple);
- }
- /* pg_type */
- else if (classoid == TypeRelationId)
- {
- Datum aclDatum;
- bool isNull;
- HeapTuple tuple;
-
- tuple = SearchSysCache1(TYPEOID, ObjectIdGetDatum(objoid));
+ tuple = SearchSysCache1(get_object_catcache_oid(classoid),
+ ObjectIdGetDatum(objoid));
if (!HeapTupleIsValid(tuple))
- elog(ERROR, "cache lookup failed for type %u", objoid);
+ elog(ERROR, "cache lookup failed for %s %u",
+ get_object_class_descr(classoid), objoid);
- aclDatum = SysCacheGetAttr(TYPEOID, tuple, Anum_pg_type_typacl,
+ aclDatum = SysCacheGetAttr(get_object_catcache_oid(classoid), tuple,
+ get_object_attnum_acl(classoid),
&isNull);
/* Add the record, if any, for the top-level object */
@@ -4509,33 +4399,6 @@ recordExtObjInitPriv(Oid objoid, Oid classoid)
ReleaseSysCache(tuple);
}
- else if (classoid == AccessMethodRelationId ||
- classoid == AggregateRelationId ||
- classoid == CastRelationId ||
- classoid == CollationRelationId ||
- classoid == ConversionRelationId ||
- classoid == EventTriggerRelationId ||
- classoid == OperatorRelationId ||
- classoid == OperatorClassRelationId ||
- classoid == OperatorFamilyRelationId ||
- classoid == TSConfigRelationId ||
- classoid == TSDictionaryRelationId ||
- classoid == TSParserRelationId ||
- classoid == TSTemplateRelationId ||
- classoid == TransformRelationId
- )
- {
- /* no ACL for these object types, so do nothing. */
- }
-
- /*
- * complain if we are given a class OID for a class that extensions don't
- * support or that we don't recognize.
- */
- else
- {
- elog(ERROR, "unrecognized or unsupported class OID: %u", classoid);
- }
}
/*
--
2.39.0
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Refactor recordExtObjInitPriv()
@ 2023-01-12 00:04 Nathan Bossart <nathandbossart@gmail.com>
parent: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
0 siblings, 1 reply; 8+ messages in thread
From: Nathan Bossart @ 2023-01-12 00:04 UTC (permalink / raw)
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>; +Cc: pgsql-hackers
On Tue, Dec 27, 2022 at 09:56:10AM +0100, Peter Eisentraut wrote:
> Refactor recordExtObjInitPriv(): Instead of half a dozen of
> mostly-duplicate conditional branches, write one common one that can handle
> most catalogs. We already have all the information we need, such as which
> system catalog corresponds to which catalog table and which column is the
> ACL column.
This seems reasonable.
> + /* This will error on unsupported classoid. */
> + else if (get_object_attnum_acl(classoid))
nitpick: I would suggest explicitly checking that it isn't
InvalidAttrNumber instead of relying on it always being 0.
> - classoid == AggregateRelationId ||
I noticed that AggregateRelationId isn't listed in the ObjectProperty
array, so I think recordExtObjInitPriv() will begin erroring for that
classoid instead of ignoring it like we do today.
--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Refactor recordExtObjInitPriv()
@ 2023-01-12 17:15 Peter Eisentraut <peter.eisentraut@enterprisedb.com>
parent: Nathan Bossart <nathandbossart@gmail.com>
0 siblings, 1 reply; 8+ messages in thread
From: Peter Eisentraut @ 2023-01-12 17:15 UTC (permalink / raw)
To: Nathan Bossart <nathandbossart@gmail.com>; +Cc: pgsql-hackers
On 12.01.23 01:04, Nathan Bossart wrote:
>> - classoid == AggregateRelationId ||
> I noticed that AggregateRelationId isn't listed in the ObjectProperty
> array, so I think recordExtObjInitPriv() will begin erroring for that
> classoid instead of ignoring it like we do today.
Hmm, we do have some extensions in contrib that add aggregates (citext,
intagg). I suspect that the aggregate function is actually registered
into the extension via its pg_proc entry, so this wouldn't actually
matter. But maybe the commenting should be clearer?
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Refactor recordExtObjInitPriv()
@ 2023-01-12 17:20 Tom Lane <tgl@sss.pgh.pa.us>
parent: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
0 siblings, 1 reply; 8+ messages in thread
From: Tom Lane @ 2023-01-12 17:20 UTC (permalink / raw)
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>; +Cc: Nathan Bossart <nathandbossart@gmail.com>; pgsql-hackers
Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:
> On 12.01.23 01:04, Nathan Bossart wrote:
> - classoid == AggregateRelationId ||
>> I noticed that AggregateRelationId isn't listed in the ObjectProperty
>> array, so I think recordExtObjInitPriv() will begin erroring for that
>> classoid instead of ignoring it like we do today.
> Hmm, we do have some extensions in contrib that add aggregates (citext,
> intagg). I suspect that the aggregate function is actually registered
> into the extension via its pg_proc entry, so this wouldn't actually
> matter. But maybe the commenting should be clearer?
Yeah, I don't believe that AggregateRelationId is used in object
addresses; we just refer to pg_proc for any kind of function including
aggregates. Note that there is no "oid" column in pg_aggregate.
regards, tom lane
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Refactor recordExtObjInitPriv()
@ 2023-01-12 17:40 Nathan Bossart <nathandbossart@gmail.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 8+ messages in thread
From: Nathan Bossart @ 2023-01-12 17:40 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>; pgsql-hackers
On Thu, Jan 12, 2023 at 12:20:50PM -0500, Tom Lane wrote:
> Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:
>> On 12.01.23 01:04, Nathan Bossart wrote:
>> - classoid == AggregateRelationId ||
>>> I noticed that AggregateRelationId isn't listed in the ObjectProperty
>>> array, so I think recordExtObjInitPriv() will begin erroring for that
>>> classoid instead of ignoring it like we do today.
>
>> Hmm, we do have some extensions in contrib that add aggregates (citext,
>> intagg). I suspect that the aggregate function is actually registered
>> into the extension via its pg_proc entry, so this wouldn't actually
>> matter. But maybe the commenting should be clearer?
>
> Yeah, I don't believe that AggregateRelationId is used in object
> addresses; we just refer to pg_proc for any kind of function including
> aggregates. Note that there is no "oid" column in pg_aggregate.
Got it, thanks for clarifying.
--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Refactor recordExtObjInitPriv()
@ 2023-01-16 11:01 Peter Eisentraut <peter.eisentraut@enterprisedb.com>
parent: Nathan Bossart <nathandbossart@gmail.com>
0 siblings, 1 reply; 8+ messages in thread
From: Peter Eisentraut @ 2023-01-16 11:01 UTC (permalink / raw)
To: Nathan Bossart <nathandbossart@gmail.com>; Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-hackers
On 12.01.23 18:40, Nathan Bossart wrote:
> On Thu, Jan 12, 2023 at 12:20:50PM -0500, Tom Lane wrote:
>> Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:
>>> On 12.01.23 01:04, Nathan Bossart wrote:
>>> - classoid == AggregateRelationId ||
>>>> I noticed that AggregateRelationId isn't listed in the ObjectProperty
>>>> array, so I think recordExtObjInitPriv() will begin erroring for that
>>>> classoid instead of ignoring it like we do today.
>>
>>> Hmm, we do have some extensions in contrib that add aggregates (citext,
>>> intagg). I suspect that the aggregate function is actually registered
>>> into the extension via its pg_proc entry, so this wouldn't actually
>>> matter. But maybe the commenting should be clearer?
>>
>> Yeah, I don't believe that AggregateRelationId is used in object
>> addresses; we just refer to pg_proc for any kind of function including
>> aggregates. Note that there is no "oid" column in pg_aggregate.
>
> Got it, thanks for clarifying.
I have updated the patch as you suggested and split out the aggregate
issue into a separate patch for clarity.
Attachments: download all (2 files, .tar.gz)
v2-0001-Remove-AggregateRelationId-from-recordExtObjInitP.patch (text/plain, 1.1K) download
From 570643e44f17b1284a4639ab2d14bfcbbd487b7c Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Mon, 16 Jan 2023 11:46:13 +0100
Subject: [PATCH v2 1/2] Remove AggregateRelationId from recordExtObjInitPriv()
This was erroneous, because AggregateRelationId has no OID, so it
cannot be part of an extension directly. (Aggregates are registered
via pg_proc.) No harm in practice, but better to make it correct.
Discussion: https://www.postgresql.org/message-id/flat/504bc485-6bd6-dd1b-fe10-e7351aeb310d@enterprisedb.com
---
src/backend/catalog/aclchk.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/backend/catalog/aclchk.c b/src/backend/catalog/aclchk.c
index cc6e260908..7cb2faa187 100644
--- a/src/backend/catalog/aclchk.c
+++ b/src/backend/catalog/aclchk.c
@@ -4510,7 +4510,6 @@ recordExtObjInitPriv(Oid objoid, Oid classoid)
ReleaseSysCache(tuple);
}
else if (classoid == AccessMethodRelationId ||
- classoid == AggregateRelationId ||
classoid == CastRelationId ||
classoid == CollationRelationId ||
classoid == ConversionRelationId ||
base-commit: 20428d344a2964de6aaef9984fcd472f3c65d115
--
2.39.0
v2-0002-Refactor-recordExtObjInitPriv.patch (text/plain, 6.4K) download
From d093fe1384f9f95779ccd13caa3f2967508c3c58 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Mon, 16 Jan 2023 11:49:24 +0100
Subject: [PATCH v2 2/2] Refactor recordExtObjInitPriv()
Instead of half a dozen of mostly-duplicate conditional branches,
write one common one that can handle most catalogs. We already have
all the information we need, such as which system catalog corresponds
to which catalog table and which column is the ACL column.
Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/504bc485-6bd6-dd1b-fe10-e7351aeb310d@enterprisedb.com
---
src/backend/catalog/aclchk.c | 152 ++---------------------------------
1 file changed, 8 insertions(+), 144 deletions(-)
diff --git a/src/backend/catalog/aclchk.c b/src/backend/catalog/aclchk.c
index 7cb2faa187..c4232344aa 100644
--- a/src/backend/catalog/aclchk.c
+++ b/src/backend/catalog/aclchk.c
@@ -4241,9 +4241,6 @@ recordDependencyOnNewAcl(Oid classId, Oid objectId, int32 objsubId,
*
* For the object passed in, this will record its ACL (if any) and the ACLs of
* any sub-objects (eg: columns) into pg_init_privs.
- *
- * Any new kinds of objects which have ACLs associated with them and can be
- * added to an extension should be added to the if-else tree below.
*/
void
recordExtObjInitPriv(Oid objoid, Oid classoid)
@@ -4336,74 +4333,6 @@ recordExtObjInitPriv(Oid objoid, Oid classoid)
ReleaseSysCache(tuple);
}
- /* pg_foreign_data_wrapper */
- else if (classoid == ForeignDataWrapperRelationId)
- {
- Datum aclDatum;
- bool isNull;
- HeapTuple tuple;
-
- tuple = SearchSysCache1(FOREIGNDATAWRAPPEROID,
- ObjectIdGetDatum(objoid));
- if (!HeapTupleIsValid(tuple))
- elog(ERROR, "cache lookup failed for foreign data wrapper %u",
- objoid);
-
- aclDatum = SysCacheGetAttr(FOREIGNDATAWRAPPEROID, tuple,
- Anum_pg_foreign_data_wrapper_fdwacl,
- &isNull);
-
- /* Add the record, if any, for the top-level object */
- if (!isNull)
- recordExtensionInitPrivWorker(objoid, classoid, 0,
- DatumGetAclP(aclDatum));
-
- ReleaseSysCache(tuple);
- }
- /* pg_foreign_server */
- else if (classoid == ForeignServerRelationId)
- {
- Datum aclDatum;
- bool isNull;
- HeapTuple tuple;
-
- tuple = SearchSysCache1(FOREIGNSERVEROID, ObjectIdGetDatum(objoid));
- if (!HeapTupleIsValid(tuple))
- elog(ERROR, "cache lookup failed for foreign server %u",
- objoid);
-
- aclDatum = SysCacheGetAttr(FOREIGNSERVEROID, tuple,
- Anum_pg_foreign_server_srvacl,
- &isNull);
-
- /* Add the record, if any, for the top-level object */
- if (!isNull)
- recordExtensionInitPrivWorker(objoid, classoid, 0,
- DatumGetAclP(aclDatum));
-
- ReleaseSysCache(tuple);
- }
- /* pg_language */
- else if (classoid == LanguageRelationId)
- {
- Datum aclDatum;
- bool isNull;
- HeapTuple tuple;
-
- tuple = SearchSysCache1(LANGOID, ObjectIdGetDatum(objoid));
- if (!HeapTupleIsValid(tuple))
- elog(ERROR, "cache lookup failed for language %u", objoid);
-
- aclDatum = SysCacheGetAttr(LANGOID, tuple, Anum_pg_language_lanacl,
- &isNull);
-
- /* Add the record, if any, for the top-level object */
- if (!isNull)
- recordExtensionInitPrivWorker(objoid, classoid, 0,
- DatumGetAclP(aclDatum));
-
- ReleaseSysCache(tuple);
- }
/* pg_largeobject_metadata */
else if (classoid == LargeObjectMetadataRelationId)
{
@@ -4446,60 +4375,21 @@ recordExtObjInitPriv(Oid objoid, Oid classoid)
systable_endscan(scan);
}
- /* pg_namespace */
- else if (classoid == NamespaceRelationId)
+ /* This will error on unsupported classoid. */
+ else if (get_object_attnum_acl(classoid) != InvalidAttrNumber)
{
Datum aclDatum;
bool isNull;
HeapTuple tuple;
- tuple = SearchSysCache1(NAMESPACEOID, ObjectIdGetDatum(objoid));
- if (!HeapTupleIsValid(tuple))
- elog(ERROR, "cache lookup failed for schema %u", objoid);
-
- aclDatum = SysCacheGetAttr(NAMESPACEOID, tuple,
- Anum_pg_namespace_nspacl, &isNull);
-
- /* Add the record, if any, for the top-level object */
- if (!isNull)
- recordExtensionInitPrivWorker(objoid, classoid, 0,
- DatumGetAclP(aclDatum));
-
- ReleaseSysCache(tuple);
- }
- /* pg_proc */
- else if (classoid == ProcedureRelationId)
- {
- Datum aclDatum;
- bool isNull;
- HeapTuple tuple;
-
- tuple = SearchSysCache1(PROCOID, ObjectIdGetDatum(objoid));
- if (!HeapTupleIsValid(tuple))
- elog(ERROR, "cache lookup failed for function %u", objoid);
-
- aclDatum = SysCacheGetAttr(PROCOID, tuple, Anum_pg_proc_proacl,
- &isNull);
-
- /* Add the record, if any, for the top-level object */
- if (!isNull)
- recordExtensionInitPrivWorker(objoid, classoid, 0,
- DatumGetAclP(aclDatum));
-
- ReleaseSysCache(tuple);
- }
- /* pg_type */
- else if (classoid == TypeRelationId)
- {
- Datum aclDatum;
- bool isNull;
- HeapTuple tuple;
-
- tuple = SearchSysCache1(TYPEOID, ObjectIdGetDatum(objoid));
+ tuple = SearchSysCache1(get_object_catcache_oid(classoid),
+ ObjectIdGetDatum(objoid));
if (!HeapTupleIsValid(tuple))
- elog(ERROR, "cache lookup failed for type %u", objoid);
+ elog(ERROR, "cache lookup failed for %s %u",
+ get_object_class_descr(classoid), objoid);
- aclDatum = SysCacheGetAttr(TYPEOID, tuple, Anum_pg_type_typacl,
+ aclDatum = SysCacheGetAttr(get_object_catcache_oid(classoid), tuple,
+ get_object_attnum_acl(classoid),
&isNull);
/* Add the record, if any, for the top-level object */
@@ -4509,32 +4399,6 @@ recordExtObjInitPriv(Oid objoid, Oid classoid)
ReleaseSysCache(tuple);
}
- else if (classoid == AccessMethodRelationId ||
- classoid == CastRelationId ||
- classoid == CollationRelationId ||
- classoid == ConversionRelationId ||
- classoid == EventTriggerRelationId ||
- classoid == OperatorRelationId ||
- classoid == OperatorClassRelationId ||
- classoid == OperatorFamilyRelationId ||
- classoid == TSConfigRelationId ||
- classoid == TSDictionaryRelationId ||
- classoid == TSParserRelationId ||
- classoid == TSTemplateRelationId ||
- classoid == TransformRelationId
- )
- {
- /* no ACL for these object types, so do nothing. */
- }
-
- /*
- * complain if we are given a class OID for a class that extensions don't
- * support or that we don't recognize.
- */
- else
- {
- elog(ERROR, "unrecognized or unsupported class OID: %u", classoid);
- }
}
/*
--
2.39.0
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Refactor recordExtObjInitPriv()
@ 2023-01-16 22:43 Nathan Bossart <nathandbossart@gmail.com>
parent: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
0 siblings, 1 reply; 8+ messages in thread
From: Nathan Bossart @ 2023-01-16 22:43 UTC (permalink / raw)
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-hackers
On Mon, Jan 16, 2023 at 12:01:47PM +0100, Peter Eisentraut wrote:
> I have updated the patch as you suggested and split out the aggregate issue
> into a separate patch for clarity.
LGTM
--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Refactor recordExtObjInitPriv()
@ 2023-01-17 19:16 Peter Eisentraut <peter.eisentraut@enterprisedb.com>
parent: Nathan Bossart <nathandbossart@gmail.com>
0 siblings, 0 replies; 8+ messages in thread
From: Peter Eisentraut @ 2023-01-17 19:16 UTC (permalink / raw)
To: Nathan Bossart <nathandbossart@gmail.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-hackers
On 16.01.23 23:43, Nathan Bossart wrote:
> On Mon, Jan 16, 2023 at 12:01:47PM +0100, Peter Eisentraut wrote:
>> I have updated the patch as you suggested and split out the aggregate issue
>> into a separate patch for clarity.
>
> LGTM
committed
^ permalink raw reply [nested|flat] 8+ messages in thread
end of thread, other threads:[~2023-01-17 19:16 UTC | newest]
Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-12-27 08:56 Refactor recordExtObjInitPriv() Peter Eisentraut <peter.eisentraut@enterprisedb.com>
2023-01-12 00:04 ` Nathan Bossart <nathandbossart@gmail.com>
2023-01-12 17:15 ` Peter Eisentraut <peter.eisentraut@enterprisedb.com>
2023-01-12 17:20 ` Tom Lane <tgl@sss.pgh.pa.us>
2023-01-12 17:40 ` Nathan Bossart <nathandbossart@gmail.com>
2023-01-16 11:01 ` Peter Eisentraut <peter.eisentraut@enterprisedb.com>
2023-01-16 22:43 ` Nathan Bossart <nathandbossart@gmail.com>
2023-01-17 19:16 ` Peter Eisentraut <peter.eisentraut@enterprisedb.com>
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