]> granicus.if.org Git - postgresql/commit
Fix incorrect encoding-aware name truncation in makeArrayTypeName().
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 16 Aug 2009 18:14:39 +0000 (18:14 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 16 Aug 2009 18:14:39 +0000 (18:14 +0000)
commitef75f74f4c6063e6feba503510d3cdb4c24992eb
treefb23d6fecc6fedd70ad04fa4c3a79d97a21706d7
parent08d1d6176989153efd68d4db1e4755e74977bab7
Fix incorrect encoding-aware name truncation in makeArrayTypeName().

truncate_identifier won't do anything if the passed-in strlen is already
less than NAMEDATALEN, which it always would be given the strlcpy usage.
This has been broken since the arrays-of-composite-types code went in.

Arguably truncate_identifier is suffering from excessive optimization
and should always process the string, but for the moment I'll take the
more localized patch.

Per bug #4987.
src/backend/catalog/pg_type.c