OSDN Git Service

Fix the problem that creating a user-defined type named _foo, followed by one
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 12 May 2007 00:55:00 +0000 (00:55 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 12 May 2007 00:55:00 +0000 (00:55 +0000)
commit9aa3c782c939f29bd562a22030fb3a64e6f18365
treec02802067d14db9573f6c4e0350ec91b5d503283
parentd8326119c8885e938eff79e22fce6c1cb19379f4
Fix the problem that creating a user-defined type named _foo, followed by one
named foo, would work but the other ordering would not.  If a user-specified
type or table name collides with an existing auto-generated array name, just
rename the array type out of the way by prepending more underscores.  This
should not create any backward-compatibility issues, since the cases in which
this will happen would have failed outright in prior releases.

Also fix an oversight in the arrays-of-composites patch: ALTER TABLE RENAME
renamed the table's rowtype but not its array type.
doc/src/sgml/ref/create_type.sgml
src/backend/catalog/heap.c
src/backend/catalog/pg_type.c
src/backend/commands/tablecmds.c
src/backend/commands/typecmds.c
src/include/catalog/pg_type.h
src/test/regress/expected/arrays.out
src/test/regress/sql/arrays.sql