]> granicus.if.org Git - postgresql/commit
Move autogenerated array types out of the way during ALTER ... RENAME.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 26 May 2017 19:16:59 +0000 (15:16 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 26 May 2017 19:16:59 +0000 (15:16 -0400)
commit94aced8cd0e229670877fe5c406a98d9a4f1b92a
tree99ad5e8370ef6a3f0f378293d7d3ff62716ee366
parent0461b66e361f56560aaa50e1bd006e36e8bedc6e
Move autogenerated array types out of the way during ALTER ... RENAME.

Commit 9aa3c782c added code to allow CREATE TABLE/CREATE TYPE to not fail
when the desired type name conflicts with an autogenerated array type, by
dint of renaming the array type out of the way.  But I (tgl) overlooked
that the same case arises in ALTER TABLE/TYPE RENAME.  Fix that too.
Back-patch to all supported branches.

Report and patch by Vik Fearing, modified a bit by me

Discussion: https://postgr.es/m/0f4ade49-4f0b-a9a3-c120-7589f01d1eb8@2ndquadrant.com
src/backend/catalog/pg_type.c
src/test/regress/expected/alter_table.out
src/test/regress/sql/alter_table.sql