Commit 692bd09a authored by Tom Lane's avatar Tom Lane

Use "#ifdef CATALOG_VARLEN" to protect nullable fields of pg_authid.

This gives a stronger guarantee than a mere comment against accessing these
fields as simple struct members.  Since rolpassword is in fact varlena,
it's not clear why these didn't get marked from the beginning, but let's
do it now.

Michael Paquier
parent 09d8d110
...@@ -56,8 +56,10 @@ CATALOG(pg_authid,1260) BKI_SHARED_RELATION BKI_ROWTYPE_OID(2842) BKI_SCHEMA_MAC ...@@ -56,8 +56,10 @@ CATALOG(pg_authid,1260) BKI_SHARED_RELATION BKI_ROWTYPE_OID(2842) BKI_SCHEMA_MAC
int32 rolconnlimit; /* max connections allowed (-1=no limit) */ int32 rolconnlimit; /* max connections allowed (-1=no limit) */
/* remaining fields may be null; use heap_getattr to read them! */ /* remaining fields may be null; use heap_getattr to read them! */
#ifdef CATALOG_VARLEN /* variable-length fields start here */
text rolpassword; /* password, if any */ text rolpassword; /* password, if any */
timestamptz rolvaliduntil; /* password expiration time, if any */ timestamptz rolvaliduntil; /* password expiration time, if any */
#endif
} FormData_pg_authid; } FormData_pg_authid;
#undef timestamptz #undef timestamptz
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment