Re: [HACKERS] Create Group

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Create Group
Date: 1999-12-13 22:35:42
Message-ID: 12753.945124542@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Now I do
> template1=> alter group one add user foo;
> NOTICE: Cannot add users to a group, yet.
> ALTER USER
> /* OK */
> template1=> alter group two add user foo;
> AlterGroup: Group "two" does not exist.
> /* Huh? */

I'll bet you forgot to update the indexes on pg_group. heap_insert is
not sufficient for a table that has indexes; you have to do a little
number that typically looks like (this example from the COMMENT code):

if (RelationGetForm(description)->relhasindex) {
Relation idescs[Num_pg_description_indices];

CatalogOpenIndices(Num_pg_description_indices,
Name_pg_description_indices, idescs);
CatalogIndexInsert(idescs, Num_pg_description_indices, description,
desctuple);
CatalogCloseIndices(Num_pg_description_indices, idescs);
}

> Also, why can pg_group not be vacuumed? (pg_shadow can.) With all this
> testing, mine is filling up.

> Perhaps related, but just out of curiosity: Why is pg_group a system
> relatation (pg_class.relkind='s')?

That seems wrong, wrong, wrong --- and it probably explains why VACUUM
won't touch it. 's' is for special relations not system relations, and
pg_group is not special. I'm surprised it works at all...

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1999-12-13 22:52:08 Re: [HACKERS] generic LONG VARLENA
Previous Message Tom Lane 1999-12-13 22:24:38 Re: [HACKERS] "ExecInitIndexScan: both left and right..." meaning?