Re: pg_dump --binary-upgrade vs. ALTER TYPE ... DROP ATTRIBUTE

Поиск
Список
Период
Сортировка
От Noah Misch
Тема Re: pg_dump --binary-upgrade vs. ALTER TYPE ... DROP ATTRIBUTE
Дата
Msg-id 20110415155830.GC18609@tornado.leadboat.com
обсуждение исходный текст
Ответ на Re: pg_dump --binary-upgrade vs. ALTER TYPE ... DROP ATTRIBUTE  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: pg_dump --binary-upgrade vs. ALTER TYPE ... DROP ATTRIBUTE  (Noah Misch <noah@leadboat.com>)
Список pgsql-hackers
Robert,

Thanks for the review.

On Wed, Apr 13, 2011 at 08:01:17PM -0700, Robert Haas wrote:
> I think you only need an AccessShareLock on InheritsRelationId, since
> you are only selecting from it.

True; fixed.

> If we adopt the elsewhere-proposed approach of forbidding the use of
> rowtypes to create typed tables, the circularity-checking logic here
> can become simpler.  I think it's not actually water-tight right now:
> 
> rhaas=# create table a (x int);
> CREATE TABLE
> rhaas=# create table b of a;
> CREATE TABLE
> rhaas=# create table c () inherits (b);
> CREATE TABLE
> rhaas=# create table d of c;
> CREATE TABLE
> rhaas=# alter table a of d;
> ALTER TABLE
> 
> pg_dump is not happy with this situation.

Good test case.

Since we're going to forbid hanging a typed table off a table rowtype, I believe
the circularity check becomes entirely superfluous.  I'm suspicious that I'm
missing some way to introduce problematic circularity using composite-typed
columns, but I couldn't come up with a problematic example.  The current check
would not detect such a problem, if one does exist, anyway.

When we're done with the relkind-restriction patch, I'll post a new version of
this one.  It will remove the circularity check and add a relkind check.

nm


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Rename pg_regress option --multibyte to --encoding
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Rename pg_regress option --multibyte to --encoding