Re: [HACKERS] Re: [SQL] Proposed Changes to PostgreSQL - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] Re: [SQL] Proposed Changes to PostgreSQL
Date
Msg-id 200002031237.HAA21220@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] Re: [SQL] Proposed Changes to PostgreSQL  (Chris <chris@bitmead.com>)
Responses relhasindex(was RE: [HACKERS] Proposed Changes to PostgreSQL)  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
List pgsql-hackers
> Bruce Momjian wrote:
> 
> > > Well I see that pg_class has columns like "relhasindex". If we added a
> > > "relhassubclass", the overhead should be unmeasureable.
> > 
> > Yes, but how do you keep that accurate?  If I add indexes, then drop
> > them, does relhasindex go to false. 
> 
> I don't know. Does it? 

Oops:test=> create table test(x int);CREATEtest=> create index i_test on test(x);CREATEtest=> select relhasindex from
pg_classwhere relname = 'test'; relhasindex ------------- t(1 row)
 
test=> drop index i_test;DROPtest=> select relhasindex from pg_class where relname = 'test'; relhasindex -------------
t(1row)
 

Let me add that to the TODO list.

> 
> >Could you do that for relhassubclass?
> 
> If we made it relnumsubclasses and incremented/decremented on
> CREATE/DROP, it seems easy in theory.

Yes, that would work.  Seems hasindex has problems.

--  Bruce Momjian                        |  http://www.op.net/~candle pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Chris
Date:
Subject: Re: [HACKERS] Re: [SQL] Proposed Changes to PostgreSQL
Next
From: Chris
Date:
Subject: Re: [HACKERS] Re: [SQL] Proposed Changes to PostgreSQL