Skip site navigation (1) Skip section navigation (2)

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

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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 18:19:55
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Sun, Jan 3, 2010 at 11:18 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> 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.

I haven't read the code in enough detail to have an educated opinion
about whether that would induce enough overhead to be worth worrying
about it, so I will refrain from comment on this until I have done my


In response to

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2010-01-04 18:28:52
Subject: Re: pg_migrator issues
Previous:From: Bruce MomjianDate: 2010-01-04 18:12:46
Subject: Re: pg_migrator issues

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group