Re: Incautious handling of overlength identifiers

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Michael Paquier <michael.paquier@gmail.com>, Joe Conway <mail@joeconway.com>, PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Date: 2016-12-26T19:07:30Z
Lists: pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> I also admit it didn't occur to me to test the function(s) against
> overlength input when developing it.  I wouldn't object to adding code
> to deal with overlength identifies, but I'm not really sure I would
> choose truncation over reporting an error.  But whatever it'd be, it'd
> be at that level, not at the lower (hash function) level.

Yeah, I'm now convinced that whatever we do about this, if we do anything,
needs to be at a higher code level.  It's not hashname()'s job to prevent
use of overlength names.  I'll go remove the Assert.

			regards, tom lane


Commits

  1. Remove triggerable Assert in hashname().