Re: BUG #7763: "CREATE TABLE ... (LIKE ... INCLUDING INDEXES ...)" does not work with indexes on composite types

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: norbi(at)nix(dot)hu, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #7763: "CREATE TABLE ... (LIKE ... INCLUDING INDEXES ...)" does not work with indexes on composite types
Date: 2012-12-23 18:04:01
Message-ID: 27277.1356285841@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> On 2012-12-22 16:11:47 -0500, Tom Lane wrote:
>> BTW, it sure looks to me like transformXmlExpr will get an Assert
>> failure on an already-transformed expression ...

> Yep. I am pretty sure there are others :(

Eyeball inspection doesn't find any: either the output node type is
different, or the function has a guard against repeat analysis, or
it actually is idempotent anyway.

I plan to commit a fix that just adds guards to transformRowExpr and
transformXmlExpr. If you feel like expending more work in this area,
I'd suggest looking into what it would take to remove the requirement
of idempotence. We know at least three places that would need changes
--- what others are there?

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Felt 2012-12-24 10:17:58 packaging for AIX - compliments!!
Previous Message Andres Freund 2012-12-23 00:37:49 Re: BUG #7763: "CREATE TABLE ... (LIKE ... INCLUDING INDEXES ...)" does not work with indexes on composite types