Re: [BUG?] strange behavior in ALTER TABLE ... RENAME TO on inherited columns

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>, KaiGai Kohei <kaigai(at)kaigai(dot)gr(dot)jp>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Thom Brown <thombrown(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Subject: Re: [BUG?] strange behavior in ALTER TABLE ... RENAME TO on inherited columns
Date: 2010-01-04 04:18:26
Message-ID: 22211.1262578706@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> 2010/1/3 KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>:
>> if (number_of_attribute_origin(myrelid, oldattname) > 1)
>> ereport(ERROR, ...);
>>
>> Am I missing something?

> That sounds about right to me,

It looks remarkably inefficient to me. Do you propose to search the
entire database's inheritance tree to derive that number? And do it
over again at each child table? The method I suggested would allow the
necessary information to be extracted during the initial search for
child tables, which we have to do anyway.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2010-01-04 04:19:28 Re: patch - per-tablespace random_page_cost/seq_page_cost
Previous Message Tom Lane 2010-01-04 04:12:39 Re: Buffer statistics for pg_stat_statements