Re: [HACKERS] Problems with ALTER DOMAIN patch

2002-12-12 Thread Rod Taylor
On Wed, 2002-12-11 at 19:00, Bruce Momjian wrote: > It is an idea if no better one can be found, unless we don't want ALTER > DOMAIN at all, which doesn't seem good. I'll make a proposal for 'Object' locks as suggested, and we'll see where we go from there. -- Rod Taylor <[EMAIL PROTECTED]> PGP

Re: [HACKERS] Problems with ALTER DOMAIN patch

2002-12-11 Thread Bruce Momjian
It is an idea if no better one can be found, unless we don't want ALTER DOMAIN at all, which doesn't seem good. --- Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > I have an idea. Rather than doing some comp

Re: [HACKERS] Problems with ALTER DOMAIN patch

2002-12-11 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > I have an idea. Rather than doing some complex locking for types, why > don't we just restrict ALTER DOMAIN to cases where we are the only one > attached to the database, as seen in dropdb(). Yech! > would allow the regression test to work too because

Re: [HACKERS] Problems with ALTER DOMAIN patch

2002-12-11 Thread Bruce Momjian
Rod Taylor wrote: -- Start of PGP signed section. > On Wed, 2002-12-11 at 00:05, Tom Lane wrote: > > Rod Taylor <[EMAIL PROTECTED]> writes: > > > On Tue, 2002-12-10 at 22:56, Tom Lane wrote: > > >> relation's pg_class row. We have no such locks on types at present, > > >> but I think it may be tim

Re: [HACKERS] Problems with ALTER DOMAIN patch

2002-12-11 Thread Rod Taylor
On Wed, 2002-12-11 at 00:05, Tom Lane wrote: > Rod Taylor <[EMAIL PROTECTED]> writes: > > On Tue, 2002-12-10 at 22:56, Tom Lane wrote: > >> relation's pg_class row. We have no such locks on types at present, > >> but I think it may be time to invent 'em. > > > I'd be happy to use them once create

Re: [HACKERS] Problems with ALTER DOMAIN patch

2002-12-10 Thread Tom Lane
Rod Taylor <[EMAIL PROTECTED]> writes: > On Tue, 2002-12-10 at 22:56, Tom Lane wrote: >> relation's pg_class row. We have no such locks on types at present, >> but I think it may be time to invent 'em. > I'd be happy to use them once created. I think you misunderstood me ;=) ... that was a none-

Re: [HACKERS] Problems with ALTER DOMAIN patch

2002-12-10 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Where does that leave the patch _until_ they are created? I'd say "it's under death sentence unless fixed before 7.4 release". I don't want to back it out in toto right now, because that will interfere with other edits I'm in process of making (and also

Re: [HACKERS] Problems with ALTER DOMAIN patch

2002-12-10 Thread Bruce Momjian
Rod Taylor wrote: > > relation's pg_class row. We have no such locks on types at present, > > but I think it may be time to invent 'em. > > I'd be happy to use them once created. > > Thanks again for the help. Where does that leave the patch _until_ they are created? -- Bruce Momjian

Re: [HACKERS] Problems with ALTER DOMAIN patch

2002-12-10 Thread Rod Taylor
On Tue, 2002-12-10 at 22:56, Tom Lane wrote: > Rod Taylor <[EMAIL PROTECTED]> writes: > >> 2. Insufficient locking, guise 2: there's no protection against someone > >> else adding a column or table while you're processing an ALTER DOMAIN, > >> either. This means that constraint checks will be miss

Re: [HACKERS] Problems with ALTER DOMAIN patch

2002-12-10 Thread Tom Lane
Rod Taylor <[EMAIL PROTECTED]> writes: >> 2. Insufficient locking, guise 2: there's no protection against someone >> else adding a column or table while you're processing an ALTER DOMAIN, >> either. This means that constraint checks will be missed. Example: > Locking the entry in pg_type doesn't

Re: [HACKERS] Problems with ALTER DOMAIN patch

2002-12-10 Thread Rod Taylor
On Tue, 2002-12-10 at 12:39, Tom Lane wrote: > I've been looking at the recently-committed ALTER DOMAIN patch, and I > think it's got some serious if not fatal problems. Specifically, the > approach to adding/dropping constraints associated with domains doesn't > work. > > 1. Insufficient locking

[HACKERS] Problems with ALTER DOMAIN patch

2002-12-10 Thread Tom Lane
I've been looking at the recently-committed ALTER DOMAIN patch, and I think it's got some serious if not fatal problems. Specifically, the approach to adding/dropping constraints associated with domains doesn't work. 1. Insufficient locking, guise 1: there's no protection against someone else dro