object_classes array is broken, again - Mailing list pgsql-hackers

From Robert Haas
Subject object_classes array is broken, again
Date
Msg-id CA+Tgmoa6SgDaxW_n_7SEhwBAc=mniYga+obUj5fmw4rU9_mLvA@mail.gmail.com
Whole thread Raw
Responses Re: object_classes array is broken, again  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Re: object_classes array is broken, again  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: object_classes array is broken, again  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
The transforms patch seems to have forgotten to add
TransformRelationId to object_classes[], much like the RLS patch
forgot to add PolicyRelationId in the same place.

Fixing this is easy, but ISTM that we need to insert some sort of a
guard to prevent people from continuing to forget this, because it's
apparently quite easy to do.  Perhaps add_object_address should
Assert(OidIsValid(object_classes[oclass])), plus a (static?) assert
someplace checking that OidIsValid(object_classes[MAX_OCLASS - 1])?

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Should we back-patch SSL renegotiation fixes?
Next
From: Andres Freund
Date:
Subject: Re: Should we back-patch SSL renegotiation fixes?