Why does TupleDescInitBuiltinEntry lack a "default: error" case?
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@lists.postgresql.org
Date: 2018-12-09T19:49:35Z
Lists: 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
Commits
-
Make TupleDescInitBuiltinEntry throw error for unsupported types.
- a628e0c5b484 11.2 landed
- 9eaba23c414d 10.7 landed
- b7a29695f744 12.0 landed