head	1.15;
access;
symbols
	REL9_0_0:1.14
	REL9_1_ALPHA1:1.15
	REL9_0_RC1:1.14
	REL9_0_BETA4:1.14
	REL9_0_STABLE:1.14.0.6
	REL9_0_BETA3:1.14
	REL9_0_BETA2:1.14
	REL7_4_29:1.7
	REL8_0_25:1.8
	REL8_1_21:1.9
	REL8_2_17:1.10
	REL8_3_11:1.11
	REL8_4_4:1.13
	REL9_0_BETA1:1.14
	REL9_0_ALPHA5_BRANCH:1.14.0.4
	REL9_0_ALPHA5:1.14
	REL7_4_28:1.7
	REL8_0_24:1.8
	REL8_1_20:1.9
	REL8_2_16:1.10
	REL8_3_10:1.11
	REL8_4_3:1.13
	REL9_0_ALPHA4:1.14
	REL9_0_ALPHA4_BRANCH:1.14.0.2
	REL8_5_ALPHA3:1.13
	REL8_5_ALPHA3_BRANCH:1.13.0.8
	REL7_4_27:1.7
	REL8_0_23:1.8
	REL8_1_19:1.9
	REL8_2_15:1.10
	REL8_3_9:1.11
	REL8_4_2:1.13
	REL8_5_ALPHA2:1.13
	REL8_5_ALPHA2_BRANCH:1.13.0.6
	REL7_4_26:1.7
	REL8_0_22:1.8
	REL8_1_18:1.9
	REL8_2_14:1.10
	REL8_3_8:1.11
	REL8_4_1:1.13
	REL8_5_ALPHA1:1.13
	REL8_5_ALPHA1_BRANCH:1.13.0.4
	REL8_4_STABLE:1.13.0.2
	REL8_4_0:1.13
	REL8_4_RC2:1.13
	REL8_4_RC1:1.13
	REL8_4_BETA2:1.13
	REL8_4_BETA1:1.13
	REL7_4_25:1.7
	REL8_0_21:1.8
	REL8_1_17:1.9
	REL8_2_13:1.10
	REL8_3_7:1.11
	REL7_4_24:1.7
	REL8_0_20:1.8
	REL8_1_16:1.9
	REL8_2_12:1.10
	REL8_3_6:1.11
	REL7_4_23:1.7
	REL8_0_19:1.8
	REL8_1_15:1.9
	REL8_2_11:1.10
	REL8_3_5:1.11
	REL7_4_22:1.7
	REL8_0_18:1.8
	REL8_1_14:1.9
	REL8_2_10:1.10
	REL8_3_4:1.11
	REL7_4_21:1.7
	REL8_0_17:1.8
	REL8_1_13:1.9
	REL8_2_9:1.10
	REL8_3_3:1.11
	REL7_4_20:1.7
	REL8_0_16:1.8
	REL8_1_12:1.9
	REL8_2_8:1.10
	REL8_3_2:1.11
	REL8_2_7:1.10
	REL8_3_1:1.11
	REL8_3_STABLE:1.11.0.2
	REL8_3_0:1.11
	REL8_3_RC2:1.11
	REL7_3_21:1.7
	REL7_4_19:1.7
	REL8_0_15:1.8
	REL8_1_11:1.9
	REL8_2_6:1.10
	REL8_3_RC1:1.11
	REL8_3_BETA4:1.11
	REL8_3_BETA3:1.11
	REL8_3_BETA2:1.11
	REL8_3_BETA1:1.11
	REL7_3_20:1.7
	REL7_4_18:1.7
	REL8_0_14:1.8
	REL8_1_10:1.9
	REL8_2_5:1.10
	REL7_3_19:1.7
	REL7_4_17:1.7
	REL8_0_13:1.8
	REL8_1_9:1.9
	REL8_2_4:1.10
	REL8_0_12:1.8
	REL8_1_8:1.9
	REL8_2_3:1.10
	REL7_3_18:1.7
	REL7_4_16:1.7
	REL8_0_11:1.8
	REL8_1_7:1.9
	REL8_2_2:1.10
	REL8_0_10:1.8
	REL8_1_6:1.9
	REL8_2_1:1.10
	REL7_4_15:1.7
	REL7_3_17:1.7
	REL8_2_STABLE:1.10.0.2
	REL8_2_0:1.10
	REL8_2_RC1:1.10
	REL8_2_BETA3:1.10
	REL8_2_BETA2:1.10
	REL8_1_5:1.9
	REL8_0_9:1.8
	REL7_4_14:1.7
	REL7_3_16:1.7
	REL8_2_BETA1:1.10
	REL7_3_15:1.7
	REL7_4_13:1.7
	REL8_0_8:1.8
	REL8_1_4:1.9
	REL7_3_14:1.7
	REL7_4_12:1.7
	REL8_0_7:1.8
	REL8_1_3:1.9
	REL7_3_13:1.7
	REL7_4_11:1.7
	REL8_0_6:1.8
	REL8_1_2:1.9
	REL7_3_12:1.7
	REL7_4_10:1.7
	REL8_0_5:1.8
	REL8_1_1:1.9
	REL8_1_STABLE:1.9.0.2
	REL8_1_0:1.9
	REL8_1_0RC1:1.9
	REL8_1_0BETA4:1.9
	REL8_1_0BETA3:1.9
	REL7_3_11:1.7
	REL7_4_9:1.7
	REL8_0_4:1.8
	REL8_1_0BETA2:1.9
	REL8_1_0BETA1:1.9
	REL7_2_8:1.2
	REL7_3_10:1.7
	REL7_4_8:1.7
	REL8_0_3:1.8
	REL8_0_2:1.8
	REL7_2_7:1.2
	REL7_3_9:1.7
	REL7_4_7:1.7
	REL8_0_1:1.8
	REL8_0_STABLE:1.8.0.4
	REL8_0_0:1.8.0.2
	REL8_0_0RC5:1.8
	REL8_0_0RC4:1.8
	REL8_0_0RC3:1.8
	REL8_0_0RC2:1.8
	REL8_0_0RC1:1.8
	REL8_0_0BETA5:1.8
	REL8_0_0BETA4:1.8
	REL7_4_6:1.7
	REL7_3_8:1.7
	REL7_2_6:1.2
	REL8_0_0BETA3:1.8
	REL8_0_0BETA2:1.8
	REL7_2_5:1.2
	REL7_4_5:1.7
	REL7_3_7:1.7
	REL7_4_4:1.7
	REL8_0_0BETA1:1.8
	REL7_4_3:1.7
	REL7_4_2:1.7
	REL7_3_6:1.7
	REL7_4_1:1.7
	REL7_3_5:1.7
	REL7_4:1.7
	REL7_4_RC2:1.7
	REL7_4_STABLE:1.7.0.6
	REL7_4_RC1:1.7
	REL7_4_BETA5:1.7
	REL7_4_BETA4:1.7
	REL7_4_BETA3:1.7
	REL7_4_BETA2:1.7
	WIN32_DEV:1.7.0.4
	REL7_4_BETA1:1.7
	REL7_3_4:1.7
	REL7_3_2:1.7
	REL7_2_4:1.2
	REL7_3_STABLE:1.7.0.2
	REL7_2_3:1.2
	REL7_2_STABLE:1.2.0.2
	REL7_2:1.2
	REL7_2_RC2:1.2
	REL7_2_RC1:1.2
	REL7_2_BETA5:1.2
	REL7_2_BETA4:1.1.1.1
	REL7_2_BETA3:1.1.1.1
	REL7_2_BETA2:1.1.1.1
	REL7_2_BETA1:1.1.1.1
	REL7_1_2:1.1.1.1
	REL7_1_STABLE:1.1.1.1.0.12
	REL7_1_BETA:1.1.1.1
	REL7_1_BETA3:1.1.1.1
	REL7_1_BETA2:1.1.1.1
	REL7_1:1.1.1.1
	REL7_0_PATCHES:1.1.1.1.0.10
	REL7_0:1.1.1.1
	REL6_5_PATCHES:1.1.1.1.0.8
	REL6_5:1.1.1.1
	REL6_4:1.1.1.1.0.6
	release-6-3:1.1.1.1
	REL2_0B:1.1.1.1.0.4
	REL2_0:1.1.1.1
	Release_2_0_0:1.1.1.1
	Release_1_0_3:1.1.1.1.0.2
	Release_2_0:1.1.1.1
	Release_1_0_2:1.1.1.1
	PG95-1_01:1.1.1.1
	PG95_DIST:1.1.1;
locks; strict;
comment	@# @;


1.15
date	2010.07.20.18.38.53;	author momjian;	state Exp;
branches;
next	1.14;

1.14
date	2010.01.05.01.06.56;	author tgl;	state Exp;
branches;
next	1.13;

1.13
date	2008.03.21.13.23.28;	author momjian;	state Exp;
branches;
next	1.12;

1.12
date	2008.03.20.17.55.14;	author momjian;	state Exp;
branches;
next	1.11;

1.11
date	2007.05.11.17.57.11;	author tgl;	state Exp;
branches;
next	1.10;

1.10
date	2006.07.31.01.16.36;	author tgl;	state Exp;
branches;
next	1.9;

1.9
date	2005.04.14.01.38.15;	author tgl;	state Exp;
branches;
next	1.8;

1.8
date	2003.11.29.19.51.42;	author pgsql;	state Exp;
branches;
next	1.7;

1.7
date	2002.04.27.21.24.33;	author tgl;	state Exp;
branches;
next	1.6;

1.6
date	2002.04.15.23.46.13;	author momjian;	state Exp;
branches;
next	1.5;

1.5
date	2002.04.08.22.09.05;	author tgl;	state Exp;
branches;
next	1.4;

1.4
date	2002.03.22.20.14.42;	author tgl;	state Exp;
branches;
next	1.3;

1.3
date	2002.03.19.01.14.41;	author momjian;	state Exp;
branches;
next	1.2;

1.2
date	2002.01.04.17.06.51;	author tgl;	state Exp;
branches;
next	1.1;

1.1
date	96.07.09.06.21.15;	author scrappy;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	96.07.09.06.21.15;	author scrappy;	state Exp;
branches;
next	;


desc
@@


1.15
log
@CVS test:  please ignore

Does modification just of CVS tag text cause an empty CVS diff for the commit?
@
text
@$PostgreSQL: pgsql/src/backend/XXcatalog/README,v 1.14 2010/01/05 01:06:56 tgl Exp $

System Catalog
==============

This directory contains .c files that manipulate the system catalogs;
src/include/catalog contains the .h files that define the structure
of the system catalogs.

When the compile-time scripts (Gen_fmgrtab.pl and genbki.pl)
execute, they grep the DATA statements out of the .h files and munge
these in order to generate the postgres.bki file.  The .bki file is then
used as input to initdb (which is just a wrapper around postgres
running single-user in bootstrapping mode) in order to generate the
initial (template) system catalog relation files.

-----------------------------------------------------------------

People who are going to hose around with the .h files should be aware
of the following facts:

- It is very important that the DATA statements be properly formatted
(e.g., no broken lines, proper use of white-space and _null_).  The
scripts are line-oriented and break easily.  In addition, the only
documentation on the proper format for them is the code in the
bootstrap/ directory.  Just be careful when adding new DATA
statements.

- Some catalogs require that OIDs be preallocated to tuples because
of cross-references from other pre-loaded tuples.  For example, pg_type
contains pointers into pg_proc (e.g., pg_type.typinput), and pg_proc
contains back-pointers into pg_type (pg_proc.proargtypes).  For such
cases, the OID assigned to a tuple may be explicitly set by use of the
"OID = n" clause of the .bki insert statement.  If no such pointers are
required to a given tuple, then the OID = n clause may be omitted
(then the system generates an OID in the usual way, or leaves it 0 in a
catalog that has no OIDs).  In practice we usually preassign OIDs
for all or none of the pre-loaded tuples in a given catalog, even if only
some of them are actually cross-referenced.

- We also sometimes preallocate OIDs for catalog tuples whose OIDs must
be known directly in the C code.  In such cases, put a #define in the
catalog's .h file, and use the #define symbol in the C code.  Writing
the actual numeric value of any OID in C code is considered very bad form.
Direct references to pg_proc OIDs are common enough that there's a special
mechanism to create the necessary #define's automatically: see
backend/utils/Gen_fmgrtab.pl.  We also have standard conventions for setting
up #define's for the pg_class OIDs of system catalogs and indexes.  For all
the other system catalogs, you have to manually create any #define's you
need.

- If you need to find a valid OID for a new predefined tuple,
use the unused_oids script.  It generates inclusive ranges of
*unused* OIDs (e.g., the line "45-900" means OIDs 45 through 900 have
not been allocated yet).  Currently, OIDs 1-9999 are reserved for manual
assignment; the unused_oids script simply looks through the include/catalog
headers to see which ones do not appear in "OID =" clauses in DATA lines.
(As of Postgres 8.1, it also looks at CATALOG and DECLARE_INDEX lines.)
You can also use the duplicate_oids script to check for mistakes.

- The OID counter starts at 10000 at bootstrap.  If a catalog row is in a
table that requires OIDs, but no OID was preassigned by an "OID =" clause,
then it will receive an OID of 10000 or above.

- To create a "BOOTSTRAP" table you have to do a lot of extra work: these
tables are not created through a normal CREATE TABLE operation, but spring
into existence when first written to during initdb.  Therefore, you must
manually create appropriate entries for them in the pre-loaded contents of
pg_class, pg_attribute, and pg_type.  Avoid making new catalogs be bootstrap
catalogs if at all possible; generally, only tables that must be written to
in order to create a table should be bootstrapped.

- Certain BOOTSTRAP tables must be at the start of the Makefile
POSTGRES_BKI_SRCS variable, as these cannot be created through the standard
heap_create_with_catalog process, because it needs these tables to exist
already.  The list of files this currently includes is:
	pg_proc.h pg_type.h pg_attribute.h pg_class.h
Within this list, pg_type.h must come before pg_attribute.h.
Also, indexing.h must be last, since the indexes can't be created until all
the tables are in place, and toasting.h should probably be next-to-last
(or at least after all the tables that need toast tables).  There are
reputedly some other order dependencies in the .bki list, too.

-----------------------------------------------------------------

When munging the .c files, you should be aware of certain conventions:

- The system catalog cache code (and most catalog-munging code in
general) assumes that the fixed-length portions of all system catalog
tuples are in fact present, because it maps C struct declarations onto
them.  Thus, the variable-length fields must all be at the end, and
only the variable-length fields of a catalog tuple are permitted to be
NULL.  For example, if you set pg_type.typrelid to be NULL, a
piece of code will likely perform "typetup->typrelid" (or, worse,
"typetyp->typelem", which follows typrelid).  This will result in
random errors or even segmentation violations.  Hence, do NOT insert
catalog tuples that contain NULL attributes except in their
variable-length portions!  (The bootstrapping code is fairly good about
marking NOT NULL each of the columns that can legally be referenced via
C struct declarations ... but those markings won't be enforced against
DATA commands, so you must get it right in a DATA line.)

- Modification of the catalogs must be performed with the proper
updating of catalog indexes!  That is, most catalogs have indexes
on them; when you munge them using the executor, the executor will
take care of doing the index updates, but if you make direct access
method calls to insert new or modified tuples into a heap, you must
also make the calls to insert the tuple into ALL of its indexes!  If
not, the new tuple will generally be "invisible" to the system because
most of the accesses to the catalogs in question will be through the
associated indexes.
@


1.14
log
@Get rid of the need for manual maintenance of the initial contents of
pg_attribute, by having genbki.pl derive the information from the various
catalog header files.  This greatly simplifies modification of the
"bootstrapped" catalogs.

This patch finally kills genbki.sh and Gen_fmgrtab.sh; we now rely entirely on
Perl scripts for those build steps.  To avoid creating a Perl build dependency
where there was not one before, the output files generated by these scripts
are now treated as distprep targets, ie, they will be built and shipped in
tarballs.  But you will need a reasonably modern Perl (probably at least
5.6) if you want to build from a CVS pull.

The changes to the MSVC build process are untested, and may well break ---
we'll soon find out from the buildfarm.

John Naylor, based on ideas from Robert Haas and others
@
text
@d1 1
a1 1
$PostgreSQL: pgsql/src/backend/catalog/README,v 1.13 2008/03/21 13:23:28 momjian Exp $
@


1.13
log
@More README src cleanups.
@
text
@d1 1
a1 1
$PostgreSQL: pgsql/src/backend/catalog/README,v 1.12 2008/03/20 17:55:14 momjian Exp $
d10 1
a10 1
When the compile-time scripts (such as Gen_fmgrtab.sh and genbki.sh)
d47 1
a47 1
backend/utils/Gen_fmgrtab.sh.  We also have standard conventions for setting
d78 1
@


1.12
log
@Make source code READMEs more consistent.  Add CVS tags to all README files.
@
text
@d1 1
a1 1
$PostgreSQL: pgsql/src/backend/catalog/README,v 1.11 2007/05/11 17:57:11 tgl Exp $
d4 1
a4 1
--------------
@


1.11
log
@Support arrays of composite types, including the rowtypes of regular tables
and views (but not system catalogs, nor sequences or toast tables).  Get rid
of the hardwired convention that a type's array type is named exactly "_type",
instead using a new column pg_type.typarray to provide the linkage.  (It still
will be named "_type", though, except in odd corner cases such as
maximum-length type names.)

Along the way, make tracking of owner and schema dependencies for types more
uniform: a type directly created by the user has these dependencies, while a
table rowtype or auto-generated array type does not have them, but depends on
its parent object instead.

David Fetter, Andrew Dunstan, Tom Lane
@
text
@d1 4
a4 1
$PostgreSQL: pgsql/src/backend/catalog/README,v 1.10 2006/07/31 01:16:36 tgl Exp $
@


1.10
log
@Change the bootstrap sequence so that toast tables for system catalogs are
created in the bootstrap phase proper, rather than added after-the-fact
by initdb.  This is cleaner than before because it allows us to retire the
undocumented ALTER TABLE ... CREATE TOAST TABLE command, but the real reason
I'm doing it is so that toast tables of shared catalogs will now have
predetermined OIDs.  This will allow a reasonably clean solution to the
problem of locking tables before we load their relcache entries, to appear
in a forthcoming patch.
@
text
@d1 1
a1 1
$PostgreSQL: pgsql/src/backend/catalog/README,v 1.9 2005/04/14 01:38:15 tgl Exp $
d89 3
a91 3
NULL.  For example, if you set pg_type.typdelim to be NULL, a
piece of code will likely perform "typetup->typdelim" (or, worse,
"typetyp->typelem", which follows typdelim).  This will result in
@


1.9
log
@First phase of project to use fixed OIDs for all system catalogs and
indexes.  Extend the macros in include/catalog/*.h to carry the info
about hand-assigned OIDs, and adjust the genbki script and bootstrap
code to make the relations actually get those OIDs.  Remove the small
number of RelOid_pg_foo macros that we had in favor of a complete
set named like the catname.h and indexing.h macros.  Next phase will
get rid of internal use of names for looking up catalogs and indexes;
but this completes the changes forcing an initdb, so it looks like a
good place to commit.
Along the way, I made the shared relations (pg_database etc) not be
'bootstrap' relations any more, so as to reduce the number of hardwired
entries and simplify changing those relations in future.  I'm not
sure whether they ever really needed to be handled as bootstrap
relations, but it seems to work fine to not do so now.
@
text
@d1 1
a1 1
$PostgreSQL: pgsql/src/backend/catalog/README,v 1.8 2003/11/29 19:51:42 pgsql Exp $
d76 3
a78 2
the tables are in place.  There are reputedly some other order dependencies
in the .bki list, too.
@


1.8
log
@
$Header: -> $PostgreSQL Changes ...
@
text
@d1 1
a1 1
$PostgreSQL: /cvsroot/pgsql-server/src/backend/catalog/README,v 1.7 2002/04/27 21:24:33 tgl Exp $
d9 1
a9 1
these in order to generate the .bki files.  The .bki files are then
d33 2
a34 2
(then the system generates a random OID in the usual way, or leaves it
0 in a catalog that has no OIDs).  In practice we usually preassign OIDs
d42 1
a42 1
(Direct references to pg_proc OIDs are common enough that there's a special
d44 4
a47 2
backend/utils/Gen_fmgrtab.sh.  For all the other system catalogs, you have
to manually create any #define's you need.)
d49 2
a50 2
- If you need to find a valid OID for a tuple that will be referred to by
others, use the unused_oids script.  It generates inclusive ranges of
d54 7
a60 12
headers to see which ones do not appear in "OID =" clauses.

- OIDs 10000-16383 are reserved for assignment by the genbki.sh script:
it will insert these OIDs if it sees a clause "OID = 0" in a DATA
statement.  You would typically use this feature if you don't care exactly
which OID is assigned to a catalog row (because it has no cross-references
you need to hardwire) but you want to give it a DESCR entry.  The DESCR macro
will not work for rows that don't have any OID at genbki.sh time.

- The OID counter starts at 16384 at bootstrap.  If a catalog row is in a
table that requires OIDs, but no OID was preassigned by hand or by genbki.sh,
then it will receive an OID of 16384 or above.
d66 1
a66 4
pg_class, pg_attribute, and pg_type.  You'll also need to add code to function
heap_create() in heap.c to force the correct OID to be assigned when the table
is first referenced.  (It's near the top of the function with the comment
beginning in "Real ugly stuff".)  Avoid making new catalogs be bootstrap
d71 1
a71 1
POSTGRES_BKI_SRCS variable, as these will not be created through the standard
d93 4
a96 1
variable-length portions!
@


1.7
log
@Support toasting of shared system relations, and provide toast tables for
pg_database, pg_shadow, pg_group, all of which now have potentially-long
fields.  Along the way, get rid of SharedSystemRelationNames list: shared
rels are now identified in their include/pg_catalog/*.h files by a
BKI_SHARED_RELATION macro, while indexes and toast rels inherit sharedness
automatically from their parent table.  Fix some bugs with failure to detoast
pg_group.grolist during ALTER GROUP.
@
text
@d1 1
a1 1
$Header: /cvsroot/pgsql/src/backend/catalog/README,v 1.6 2002/04/15 23:46:13 momjian Exp $
@


1.6
log
@The attached patch corrects an inaccuracy in src/backend/catalog/README
and fixes a few spelling mistakes in src/bakckend/lmgr/README.

Neil Conway
@
text
@d1 1
a1 1
$Header: /cvsroot/pgsql/src/backend/catalog/README,v 1.5 2002/04/08 22:09:05 tgl Exp $
d72 1
a72 1
beginning in 'Real ugly stuff'.)  Avoid making new catalogs be bootstrap
d77 3
a79 4
POSTGRES_BKI_SRCS variable, as these will not be created through standard
function means, but will be written directly to disk.  That's how pg_class is
created without depending on functions which depend on the existence of
pg_class.  The list of files this currently includes is:
@


1.5
log
@Document genbki.sh's ability to auto-assign OIDs for DESCR macros.
Some other minor wording improvements.
@
text
@d1 1
a1 1
$Header: /cvsroot/pgsql/src/backend/catalog/README,v 1.4 2002/03/22 20:14:42 tgl Exp $
d3 3
a5 2
This directory contains .c files that manipulate the system catalogs
as well as .h files that define the structure of the system catalogs.
@


1.4
log
@Improve catalog commentary.
@
text
@d1 1
a1 1
$Header: /cvsroot/pgsql/src/backend/catalog/README,v 1.3 2002/03/19 01:14:41 momjian Exp $
d30 3
a32 3
"OID =" clause of the .bki insert statement.  If no such pointers are
required to a given tuple, then the OID may be set to the wildcard value 0
(i.e., the system generates a random OID in the usual way, or leaves it
d42 3
a44 2
mechanism to create the necessary #define's automatically.  For all the
other system catalogs, you have to manually create any #define's you need.)
d48 1
a48 1
*unused* OIDs (i.e., the line "45-900" means OIDs 45 through 900 have
d53 11
d73 1
a73 1
to create a table should be bootstrapped.
@


1.3
log
@Comment patch:

This one better describes the problem.

heap.c needs to be updated to include 'Hard coded badness' for that
table.
--
Rod Taylor
@
text
@d1 1
a1 1
$Header: /cvsroot/pgsql/src/backend/catalog/README,v 1.2 2002/01/04 17:06:51 tgl Exp $
d26 6
a31 6
certain catalogs contain circular references.  For example, pg_type
contains pointers into pg_proc (pg_type.typinput), and pg_proc
contains back-pointers into pg_type (pg_proc.proargtypes).  In these
cases, the references may be explicitly set by use of the "OID ="
clause of the .bki insert statement.  If no such pointers are required
to a given tuple, then the OID may be set to the wildcard value 0
d33 11
a43 1
0 in a catalog that has no OIDs).
d45 2
a46 2
If you need to find a valid OID for a set of tuples that refer to each
other, use the unused_oids script.  It generates inclusive ranges of
d48 20
a67 10
not been allocated yet).  All OIDs that are known directly to C code 
should be referenced via #defines in the catalog .h files. So 
unused_oids is sufficient for assigning new OIDs.).  The unused_oids
script simply 'discovers' those which are free.

- BOOTSTRAP tables must be at the start of the Makefile POSTGRES_BKI_SRCS
variable, as these will not be created through standard function means, but
will be written directly to disk.  Thats how pg_class is created without
depending on functions which depend on the existance of pg_class.  The
list of files this currently includes is:
d69 3
a71 5

Don't forget to add the entry to heap.c to function heap_create() which
sets the OID of the relation when it's a bootstrapped system table.  It's
near the top of the function with the comment beginning in 'Real ugly stuff'

@


1.2
log
@Fix some incorrect and obsolete commentary.
@
text
@d1 1
a1 1
$Header: /cvsroot/pgsql/src/backend/catalog/README,v 1.1.1.1 1996/07/09 06:21:15 scrappy Exp $
d38 16
a53 8
not been allocated yet).  However, you should not rely 100% on this
script, since it only looks at the .h files in the catalog/ directory.
Do a pg_grepsrc (recursive grep) of the source tree to insure that
there aren't any hidden crocks (i.e., explicit use of a numeric OID)
anywhere in the code.  (tgl 1/2002: that advice is obsolete; there are
no hardcoded uses of OIDs in the C files anymore.  All OIDs that are known
directly to C code should be referenced via #defines in the catalog .h files.
So unused_oids is sufficient for assigning new OIDs.)
@


1.1
log
@Initial revision
@
text
@d1 1
a1 1
$Header: /usr/local/cvsroot/postgres95/postgres95/src/backend/catalog/README,v 1.1.1.1 1996/07/09 05:31:31 scrappy Exp $
d32 2
a33 1
(i.e., the system generates a random OID in the usual way).
d42 4
a45 1
anywhere in the code.
d52 5
a56 4
general) assumes that the fixed-length portion of all system catalog
tuples are in fact present.  That is, only the variable-length
portions of a catalog tuple are assumed to be permitted to be
non-NULL.  For example, if you set pg_type.typdelim to be NULL, a
d64 1
a64 1
updating of catalog indexes!  That is, several catalogs have indexes
@


1.1.1.1
log
@Postgres95 1.01 Distribution - Virgin Sources
@
text
@@
