Skip site navigation (1) Skip section navigation (2)

pgsql: Fix incorrect encoding-aware name truncation in

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix incorrect encoding-aware name truncation in
Date: 2009-08-16 18:14:46
Message-ID: 20090816181446.A4BCD75331E@cvs.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
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.

Tags:
----
REL8_3_STABLE

Modified Files:
--------------
    pgsql/src/backend/catalog:
        pg_type.c (r1.115.2.1 -> r1.115.2.2)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/pg_type.c?r1=1.115.2.1&r2=1.115.2.2)

pgsql-committers by date

Next:From: Tom LaneDate: 2009-08-16 19:55:21
Subject: pgsql: Fix imprecise documentation of random(): it never returns 1.0.
Previous:From: Tom LaneDate: 2009-08-16 18:14:39
Subject: pgsql: Fix incorrect encoding-aware name truncation in

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group