Fix incorrect encoding-aware name truncation in makeArrayTypeName().
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.

snaga/postgres-xl,tpostgres-projects/tPostgres,postmind-net/postgres-xl,jmcatamney/gpdb,ashwinstar/gpdb,adam8157/gpdb,ovr/postgres-xl,ashwinstar/gpdb,techdragon/Postgres-XL,xinzweb/gpdb,tpostgres-projects/tPostgres,arcivanov/postgres-xl,tpostgres-projects/tPostgres,Postgres-XL/Postgres-XL,greenplum-db/gpdb,greenplum-db/gpdb,Postgres-XL/Postgres-XL,ashwinstar/gpdb,techdragon/Postgres-XL,xinzweb/gpdb,arcivanov/postgres-xl,lisakowen/gpdb,postmind-net/postgres-xl,50wu/gpdb,greenplum-db/gpdb,zeroae/postgres-xl,snaga/postgres-xl,arcivanov/postgres-xl,50wu/gpdb,greenplum-db/gpdb,50wu/gpdb,jmcatamney/gpdb,yazun/postgres-xl,jmcatamney/gpdb,50wu/gpdb,snaga/postgres-xl,arcivanov/postgres-xl,Postgres-XL/Postgres-XL,50wu/gpdb,ashwinstar/gpdb,adam8157/gpdb,zeroae/postgres-xl,oberstet/postgres-xl,lisakowen/gpdb,oberstet/postgres-xl,ashwinstar/gpdb,adam8157/gpdb,xinzweb/gpdb,lisakowen/gpdb,lisakowen/gpdb,ovr/postgres-xl,50wu/gpdb,kmjungersen/PostgresXL,pavanvd/postgres-xl,techdragon/Postgres-XL,xinzweb/gpdb,adam8157/gpdb,greenplum-db/gpdb,50wu/gpdb,postmind-net/postgres-xl,pavanvd/postgres-xl,kmjungersen/PostgresXL,postmind-net/postgres-xl,tpostgres-projects/tPostgres,oberstet/postgres-xl,jmcatamney/gpdb,jmcatamney/gpdb,yazun/postgres-xl,pavanvd/postgres-xl,xinzweb/gpdb,ovr/postgres-xl,kmjungersen/PostgresXL,zeroae/postgres-xl,lisakowen/gpdb,kmjungersen/PostgresXL,adam8157/gpdb,yazun/postgres-xl,Postgres-XL/Postgres-XL,zeroae/postgres-xl,Postgres-XL/Postgres-XL,50wu/gpdb,ashwinstar/gpdb,kmjungersen/PostgresXL,pavanvd/postgres-xl,oberstet/postgres-xl,jmcatamney/gpdb,yazun/postgres-xl,pavanvd/postgres-xl,ashwinstar/gpdb,ovr/postgres-xl,xinzweb/gpdb,adam8157/gpdb,zeroae/postgres-xl,lisakowen/gpdb,postmind-net/postgres-xl,yazun/postgres-xl,arcivanov/postgres-xl,tpostgres-projects/tPostgres,oberstet/postgres-xl,jmcatamney/gpdb,arcivanov/postgres-xl,xinzweb/gpdb,ashwinstar/gpdb,adam8157/gpdb,lisakowen/gpdb,adam8157/gpdb,xinzweb/gpdb,snaga/postgres-xl,ovr/postgres-xl,greenplum-db/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,snaga/postgres-xl,lisakowen/gpdb,jmcatamney/gpdb,techdragon/Postgres-XL,techdragon/Postgres-XL