Why does TupleDescInitBuiltinEntry lack a "default: error" case? - Mailing list pgsql-hackers

From Tom Lane
Subject Why does TupleDescInitBuiltinEntry lack a "default: error" case?
Date
Msg-id 30830.1544384975@sss.pgh.pa.us
Whole thread Raw
Responses Re: Why does TupleDescInitBuiltinEntry lack a "default: error" case?  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
If the passed-in type OID isn't one of the very short list that
TupleDescInitBuiltinEntry supports, it will silently hand back
a broken TupleDesc, rather than throwing an error.  How can
this possibly be considered good code?

(So far as I can see, none of the extant callers could hit
such an error, but it's still bad code.)

            regards, tom lane


pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: Connections hang indefinitely while taking a gin index's LWLockbuffer_content lock
Next
From: Andres Freund
Date:
Subject: Re: Why does TupleDescInitBuiltinEntry lack a "default: error" case?