[PATCHES] drop if exists remnainder (reprise)

2006-06-10 Thread Andrew Dunstan
Here is an updated patch for the remaining cases of DROP objtype IF EXISTS ... as recently discussed on -hackers. The cases are: language, tablespace, trigger, rule, opclass, function, aggregate. operator, and cast. Regression tests and docs still to come. I wasn't quite sure how to form

Re: [PATCHES] ADD/DROP INHERITS

2006-06-10 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: >I also haven't checked the constraint name. To do so it would make sense to >use a small hash table. No, it'd make sense to use strcmp(). It's unlikely that there will be enough constraints attached to any one table to justify use of any but the sim

Re: [PATCHES] ADD/DROP INHERITS

2006-06-10 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > Greg Stark <[EMAIL PROTECTED]> writes: > >I also haven't checked the constraint name. To do so it would make sense > > to > >use a small hash table. > > No, it'd make sense to use strcmp(). It's unlikely that there will be > enough constraints att

Re: [PATCHES] ADD/DROP INHERITS

2006-06-10 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: > So should I set up a nested scan, essentially implementing a nested loop? or > should I gather together all the children in a list? I'd use the predigested form of the constraints attached to the Relation tupledescs, cf. RelationBuildTupleDesc, equalTupleDe

Re: [PATCHES] ADD/DROP INHERITS

2006-06-10 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > I don't believe those attributes mean anything for check constraints > ATM, but you may as well compare them anyway. If we ever do implement > them then it'd be reasonable to expect parent and child to have > identical settings. I'm not sure. Does it have t