Re: [BUGS] Dropped index on table preventing rule creation

2011-09-15 Thread Robert Haas
On Wed, Sep 14, 2011 at 10:58 PM, Tom Lane wrote: > Yeah, that's about what it would take, but what I'm asking is why > bother.  The *only* case that we support here is turning a just-created, > not-fooled-with table into a view, and I don't feel a need to promise > that we will handle other cases

Re: [BUGS] Dropped index on table preventing rule creation

2011-09-14 Thread Tom Lane
Robert Haas writes: > I spent some more time looking at this tonight. I am wondering if > perhaps we should just get rid of relhasindex. -1, there is absolutely no reason to believe that's a good idea. > ... I think we could fix Thom's complaint by changing > DefineQueryRewrite() to call Relati

Re: [BUGS] Dropped index on table preventing rule creation

2011-09-14 Thread Robert Haas
On Tue, Sep 13, 2011 at 4:31 PM, Tom Lane wrote: > Robert Haas writes: >> On Sep 10, 2011, at 11:26 PM, Tom Lane wrote: >>> (IOW, rather than "fix" this I'd prefer to rip out the code altogether. >>> But maybe we should wait a couple more years for that.) > >> IIRC, it's not dead code. I think y

Re: [BUGS] Dropped index on table preventing rule creation

2011-09-13 Thread Tom Lane
Robert Haas writes: > On Sep 10, 2011, at 11:26 PM, Tom Lane wrote: >> (IOW, rather than "fix" this I'd prefer to rip out the code altogether. >> But maybe we should wait a couple more years for that.) > IIRC, it's not dead code. I think you can still generate such a dump if you > use CREATE OR

Re: [BUGS] Dropped index on table preventing rule creation

2011-09-13 Thread Robert Haas
On Sep 10, 2011, at 11:26 PM, Tom Lane wrote: > Thom Brown writes: >> I don't use rules, but in a bit of experimentation on Git master, I >> discovered the following behaviour: > >> CREATE TABLE test1 (id serial primary key, things text); >> CREATE TABLE test2 (id serial primary key, things text

Re: [BUGS] Dropped index on table preventing rule creation

2011-09-10 Thread Tom Lane
Thom Brown writes: > I don't use rules, but in a bit of experimentation on Git master, I > discovered the following behaviour: > CREATE TABLE test1 (id serial primary key, things text); > CREATE TABLE test2 (id serial primary key, things text); > ALTER TABLE test1 DROP CONSTRAINT test1_pkey; > AL

[BUGS] Dropped index on table preventing rule creation

2011-09-10 Thread Thom Brown
Hi, I don't use rules, but in a bit of experimentation on Git master, I discovered the following behaviour: CREATE TABLE test1 (id serial primary key, things text); CREATE TABLE test2 (id serial primary key, things text); ALTER TABLE test1 DROP CONSTRAINT test1_pkey; ALTER TABLE test2 DROP CONSTR