pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Move autogenerated array types out of the way during ALTER ... R
Date: Fri, 26 May 2017 19:18:45 +0000
Message-ID: <E1dEKl3-0008Sg-GR@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

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

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/9ded5171951e9ac8a30d221b2b21e8408f101170

Modified Files
--------------
src/backend/catalog/pg_type.c             | 38 ++++++++++++++++++------
src/test/regress/expected/alter_table.out | 49 +++++++++++++++++++++++++++++++
src/test/regress/sql/alter_table.sql      | 20 +++++++++++++
3 files changed, 98 insertions(+), 9 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


view thread (6+ messages)  latest in thread

Message-ID: <E1dEKl3-0008Sg-GR@gemulon.postgresql.org>
Permalink:  ../E1dEKl3-0008Sg-GR@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1dEKl3-0008Sg-GR@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Move autogenerated array types out of the way during ALTER ... R
  In-Reply-To: <E1dEKl3-0008Sg-GR@gemulon.postgresql.org>
  References: <E1dEKl3-0008Sg-GR@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox