Re: [HACKERS] commands subdirectory continued -code cleanup

2002-04-21 Thread Christopher Kings-Lynne
> and two macros: > > RECURSE_OVER_CHILDREN(relid); > AlterTableDoSomething(childrel,...); > RECURSE_OVER_CHILDREN_END; > > (this seems more straightforward than passing the text of the function > call as a macro parameter). The above all looks fine. The other stuff I wouldn't really know a

Re: [HACKERS] commands subdirectory continued -code cleanup

2002-04-20 Thread John Gray
On Fri, 2002-04-19 at 20:38, Fernando Nasser wrote: > John Gray wrote: > > > > and two macros: > > > > RECURSE_OVER_CHILDREN(relid); > > AlterTableDoSomething(childrel,...); > > RECURSE_OVER_CHILDREN_END; > > > > (this seems more straightforward than passing the text of the function > > call as

Re: [HACKERS] commands subdirectory continued -code cleanup

2002-04-20 Thread John Gray
On Fri, 2002-04-19 at 20:34, Tom Lane wrote: > John Gray <[EMAIL PROTECTED]> writes: > > Sequences still seem to work after they've had attributes renamed, but I > > see little value in being able to do this. Is it OK to prohibit the > > renaming of sequence columns? > > That seems like an error

Re: [HACKERS] commands subdirectory continued -code cleanup

2002-04-19 Thread Fernando Nasser
John Gray wrote: > > and two macros: > > RECURSE_OVER_CHILDREN(relid); > AlterTableDoSomething(childrel,...); > RECURSE_OVER_CHILDREN_END; > > (this seems more straightforward than passing the text of the function > call as a macro parameter). > Suggestion: RECURSE_OVER_CHILDREN(inh, relid)

Re: [HACKERS] commands subdirectory continued -code cleanup

2002-04-19 Thread Tom Lane
John Gray <[EMAIL PROTECTED]> writes: > Sequences still seem to work after they've had attributes renamed, but I > see little value in being able to do this. Is it OK to prohibit the > renaming of sequence columns? That seems like an error to me. Setting defaults, constraints, etc on a sequence

[HACKERS] commands subdirectory continued -code cleanup

2002-04-19 Thread John Gray
Dear all, I've been looking at tidying up some of the repeated code which now resides in tablecmds.c - in particular the ALTER TABLE ALTER COLUMN code. Most of these routines share common code: 1) AccessExclusive Lock on relation. 2) Relation is a table, not a system table, user is owner. 3)