From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@postgresql.org
Subject: Re: Incautious handling of overlength identifiers
Date: Fri, 23 Dec 2016 15:44:12 -0500
Message-ID: <20641.1482525852@sss.pgh.pa.us> (raw)
In-Reply-To: <17691.1482523168@sss.pgh.pa.us>
References: <17691.1482523168@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
I wrote:
> So what to do? We could run around and fix these individual cases
> and call it good, but if we do, I will bet a very fine dinner that
> more such errors will sneak in before long. Seems like we need a
> coding convention that discourages just randomly treating a C string
> as a valid value of type NAME. Not sure how to get there though.
An alternative worth considering, especially for the back branches,
is simply to remove the Assert in hashname(). That would give us
the behavior that non-developers see anyway, which is that these
functions always fail to match overlength names, whether or not
the names would have matched after truncation. Trying to apply
truncation more consistently could be left as an improvement
project for later.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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
Subject: Re: Incautious handling of overlength identifiers
In-Reply-To: <20641.1482525852@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