Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67]) by hub.org (8.9.3/8.9.3) with ESMTP id IAA10507; Thu, 3 Feb 2000 08:03:24 -0500 (EST) (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id HAA21220; Thu, 3 Feb 2000 07:37:42 -0500 (EST) From: Bruce Momjian Message-Id: <200002031237.HAA21220@candle.pha.pa.us> Subject: Re: [HACKERS] Re: [SQL] Proposed Changes to PostgreSQL In-Reply-To: <3899746F.9869F4D8@bitmead.com> from Chris at "Feb 3, 2000 11:28:31 pm" To: Chris Date: Thu, 3 Feb 2000 07:37:42 -0500 (EST) CC: Tom Lane , pgsql-hackers@postgreSQL.org, pgsql-sql@postgreSQL.org X-Mailer: ELM [version 2.4ME+ PL66 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit > 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