Re: [HACKERS] Re: [SQL] Proposed Changes to PostgreSQL

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Chris <chris(at)bitmead(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgreSQL(dot)org, pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Re: [SQL] Proposed Changes to PostgreSQL
Date: 2000-02-03 12:37:42
Message-ID: 200002031237.HAA21220@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-sql

> 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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chris 2000-02-03 13:05:32 Re: [HACKERS] Re: [SQL] Proposed Changes to PostgreSQL
Previous Message Chris 2000-02-03 12:28:31 Re: [HACKERS] Re: [SQL] Proposed Changes to PostgreSQL

Browse pgsql-hackers by date

  From Date Subject
Next Message Chris 2000-02-03 13:05:32 Re: [HACKERS] Re: [SQL] Proposed Changes to PostgreSQL
Previous Message Chris 2000-02-03 12:28:31 Re: [HACKERS] Re: [SQL] Proposed Changes to PostgreSQL

Browse pgsql-sql by date

  From Date Subject
Next Message Chris 2000-02-03 13:05:32 Re: [HACKERS] Re: [SQL] Proposed Changes to PostgreSQL
Previous Message Chris 2000-02-03 12:28:31 Re: [HACKERS] Re: [SQL] Proposed Changes to PostgreSQL