Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 088CBFBD25A for ; Thu, 26 Apr 2012 19:39:17 -0300 (ADT) Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SNXLG-0001zN-JG for pgsql-bugs@postgresql.org; Thu, 26 Apr 2012 22:39:16 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id q3QMd1li016146; Thu, 26 Apr 2012 18:39:01 -0400 (EDT) To: rikard.pavelic@zg.htnet.hr cc: pgsql-bugs@postgresql.org Subject: Re: BUG #6618: incorrect restore for composite columns when order changes In-reply-to: References: Comments: In-reply-to rikard.pavelic@zg.htnet.hr message dated "Thu, 26 Apr 2012 22:20:51 -0000" Date: Thu, 26 Apr 2012 18:39:01 -0400 Message-ID: <16145.1335479941@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201204/162 X-Sequence-Number: 32913 rikard.pavelic@zg.htnet.hr writes: > Steps to reproduce problem: > 1) create composite type > 2) use composite type as column in a table > 3) clone database > 4) change order of attributes in cloned database > 5) dump to plain sql with column names > 6) restore sql dump to cloned database There is no supported method for changing the order of attributes in a composite type, so I wonder exactly how you did step 4. If it involved direct manipulation of the system catalogs, I would say this falls in the category of "if you break it, you get to keep both pieces". regards, tom lane