Re: pg_class catalog question...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
Cc: "Pgsql Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_class catalog question...
Date: 2006-03-30 17:25:32
Message-ID: 16045.1143739532@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Jonah H. Harris" <jonah(dot)harris(at)gmail(dot)com> writes:
> Does anyone know how to add a fixed-length char field to pg_class?

Changing any of the bootstrap catalogs is fairly tricky --- there are a
lot of places you have to update manually. I'd suggest looking for a
previous commit that did something similar and studying the diff.
[ digs in CVS log... ] Here are a couple of possibilities; the first
one is smaller but it's touching pg_proc not pg_class.

2005-03-29 14:44 tgl

* doc/src/sgml/bki.sgml, doc/src/sgml/catalogs.sgml,
src/backend/bootstrap/bootstrap.c, src/backend/catalog/pg_proc.c,
src/include/catalog/catversion.h,
src/include/catalog/pg_attribute.h, src/include/catalog/pg_class.h,
src/include/catalog/pg_proc.h: Add proallargtypes and proargmodes
columns to pg_proc, as per my earlier proposal for OUT parameter
support. The columns don't actually *do* anything yet, they are
just left NULLs. But I thought I'd commit this part separately as
a fairly pure example of the tasks needed when adding a column to
pg_proc or one of the other core system tables.

2002-03-26 14:15 tgl

* doc/src/sgml/catalogs.sgml, src/backend/access/heap/heapam.c,
src/backend/access/index/indexam.c,
src/backend/bootstrap/bootparse.y,
src/backend/bootstrap/bootstrap.c, src/backend/catalog/Makefile,
src/backend/catalog/aclchk.c, src/backend/catalog/genbki.sh,
src/backend/catalog/heap.c, src/backend/catalog/index.c,
src/backend/catalog/indexing.c, src/backend/catalog/namespace.c,
src/backend/commands/cluster.c, src/backend/commands/command.c,
src/backend/commands/comment.c, src/backend/commands/creatinh.c,
src/backend/commands/indexcmds.c, src/backend/commands/rename.c,
src/backend/commands/trigger.c, src/backend/commands/user.c,
src/backend/executor/execMain.c, src/backend/parser/analyze.c,
src/backend/parser/parse_clause.c,
src/backend/parser/parse_relation.c,
src/backend/rewrite/rewriteDefine.c, src/backend/tcop/utility.c,
src/backend/utils/adt/acl.c, src/backend/utils/cache/catcache.c,
src/backend/utils/cache/lsyscache.c,
src/backend/utils/cache/relcache.c,
src/backend/utils/cache/syscache.c, src/include/access/genam.h,
src/include/access/heapam.h, src/include/bootstrap/bootstrap.h,
src/include/catalog/catversion.h, src/include/catalog/heap.h,
src/include/catalog/index.h, src/include/catalog/indexing.h,
src/include/catalog/namespace.h,
src/include/catalog/pg_attribute.h, src/include/catalog/pg_class.h,
src/include/commands/cluster.h, src/include/commands/command.h,
src/include/commands/comment.h, src/include/commands/defrem.h,
src/include/commands/rename.h, src/include/nodes/parsenodes.h,
src/include/nodes/primnodes.h, src/include/utils/catcache.h,
src/include/utils/lsyscache.h, src/include/utils/rel.h,
src/include/utils/relcache.h, src/include/utils/syscache.h,
src/pl/plpgsql/src/pl_comp.c: pg_class has a relnamespace column.
You can create and access tables in schemas other than the system
namespace; however, there's no search path yet, and not all
operations work yet on tables outside the system namespace.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chris Browne 2006-03-30 17:43:33 Re: control pg_hba.conf via SQL
Previous Message Tom Lane 2006-03-30 17:17:11 Re: can't get connection during pg_dump