Re: Incautious handling of overlength identifiers
Joe Conway <mail@joeconway.com>
From: Joe Conway <mail@joeconway.com>
To: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@postgresql.org
Date: 2016-12-23T22:44:18Z
Lists: pgsql-hackers
On 12/23/2016 12:44 PM, Tom Lane wrote: > 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. That sounds reasonable to me. Joe -- Crunchy Data - http://crunchydata.com PostgreSQL Support for Secure Enterprises Consulting, Training, & Open Source Development
Commits
-
Remove triggerable Assert in hashname().
- 607d0cd14872 9.2.20 landed
- a6d5e47e68d1 9.3.16 landed
- 56d58fa0415c 9.4.11 landed
- 987c4b401f46 9.5.6 landed
- 462ab6c8b2b8 9.6.2 landed
- 54386f357825 10.0 landed