Re: [HACKERS] Re: [SQL] Proposed Changes to PostgreSQL
Bruce Momjian <pgman@candle.pha.pa.us>
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Chris <chris@bitmead.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@postgreSQL.org, pgsql-sql@postgreSQL.org
Date: 2000-02-03T12:37:42Z
Lists: 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); CREATE test=> create index i_test on test(x); CREATE test=> select relhasindex from pg_class where relname = 'test'; relhasindex ------------- t (1 row) test=> drop index i_test; DROP test=> select relhasindex from pg_class where relname = 'test'; relhasindex ------------- t (1 row) 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, Pennsylvania 19026