Re: ALTER TYPE recursion to typed tables - Mailing list pgsql-hackers

From Dimitri Fontaine
Subject Re: ALTER TYPE recursion to typed tables
Date
Msg-id m2d3q3ra16.fsf@2ndQuadrant.fr
Whole thread Raw
In response to Re: ALTER TYPE recursion to typed tables  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: ALTER TYPE recursion to typed tables
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Here is the patch that adds [RESTRICT|CASCADE] to ALTER TYPE ...
> ADD/ALTER/DROP/RENAME ATTRIBUTE, so that recurses to typed tables.

And here's my commitfest review of it:
- patch applies cleanly- adds regression tests- passes them- is useful and needed, and something we don't already have-
don'tgenerate warnings (or I missed them) :)
 

Code wise, though, I wonder about the name of the "recursing" parameter
of the renameatt_internal function is src/backend/commands/tablecmds.c,
which seems to only get used to detect erroneous attempt at renaming the
table column directly. Maybe it's only me not used enough to PostgreSQL
code yet, but here it distract the code reader. Having another parameter
called "recurse" is not helping, too, but I don't see this one needs to
be changed.

I'm not sure what a good name would be here, alter_type_cascade is an
example that comes to mind, on the verbose side.

As I think the issue is to be decided by a commiter, I will go and mark
this patch as ready for commiter!

Regards,
-- 
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Re: [BUGS] BUG #5650: Postgres service showing as stopped when in fact it is running
Next
From: Robert Haas
Date:
Subject: Re: unlogged tables