weird objectaddress.c entry for transforms

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)postgresql(dot)org, Peter Eisentraut <peter_e(at)gmx(dot)net>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Subject: weird objectaddress.c entry for transforms
Date: 2018-11-20 01:53:22
Message-ID: 20181120015322.iwron4ss4t6r3yms@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Peter, Alvaro, All,

(Peter, this is your change, Alvaro, you're the objectaddress.c master)

While looking through my oids removal patch I noticed that the
objectaddress.c ObjectProperty entry for transforms looks wrong:

typedef struct
{
Oid class_oid; /* oid of catalog */
Oid oid_index_oid; /* oid of index on system oid column */
int oid_catcache_id; /* id of catcache on system oid column */
int name_catcache_id; /* id of catcache on (name,namespace), or
* (name) if the object does not live in a
* namespace */
AttrNumber attnum_name; /* attnum of name field */
AttrNumber attnum_namespace; /* attnum of namespace field */
AttrNumber attnum_owner; /* attnum of owner field */
AttrNumber attnum_acl; /* attnum of acl field */
ObjectType objtype; /* OBJECT_* of this object type */
bool is_nsp_name_unique; /* can the nsp/name combination (or name
* alone, if there's no namespace) be
* considered a unique identifier for an
* object of this class? */
} ObjectPropertyType;

{
TransformRelationId,
TransformOidIndexId,
TRFOID,
InvalidAttrNumber,
},

this was added in https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=cac76582053e

The InvalidAttrNumber entry initializes the member for name_catcache_id,
instead of -1 as the other entries, and in contrast to the rest of the
entries it doesn't initialize the other fields. In particular objtype is
0 instead of -1 as the rest.

Greetings,

Andres Freund

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2018-11-20 01:56:20 Re: weird objectaddress.c entry for transforms
Previous Message Stephen Frost 2018-11-20 01:45:29 Re: More issues with pg_verify_checksums and checksum verification in base backups