From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@lists.postgresql.org
Subject: Why does TupleDescInitBuiltinEntry lack a "default: error" case?
Date: Sun, 09 Dec 2018 14:49:35 -0500
Message-ID: <30830.1544384975@sss.pgh.pa.us> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org
Subject: Re: Why does TupleDescInitBuiltinEntry lack a "default: error" case?
In-Reply-To: <30830.1544384975@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox