forced.
<!--
Documentation of the system catalogs, directed toward PostgreSQL developers
- $Header: /cvsroot/pgsql/doc/src/sgml/catalogs.sgml,v 2.16 2001/05/07 00:43:14 tgl Exp $
+ $Header: /cvsroot/pgsql/doc/src/sgml/catalogs.sgml,v 2.17 2001/05/14 20:30:19 momjian Exp $
-->
<chapter id="catalogs">
<entry>additional index information</entry>
</row>
- <row>
- <entry>pg_inheritproc</entry>
- <entry>(not used)</entry>
- </row>
-
<row>
<entry>pg_inherits</entry>
<entry>table inheritance hierarchy</entry>
</row>
- <row>
- <entry>pg_ipl</entry>
- <entry>(not used)</entry>
- </row>
-
<row>
<entry>pg_language</entry>
<entry>languages for writing functions</entry>
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.43 2001/03/22 06:16:10 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.44 2001/05/14 20:30:19 momjian Exp $
*
* NOTES
* This file contains the high level access-method interface to the
*/
Relation LogRelation = (Relation) NULL;
-Relation VariableRelation = (Relation) NULL;
/* ----------------
* global variables holding cached transaction id's and statuses.
static void
TransRecover(Relation logRelation)
{
-#ifdef NOT_USED
-
- /*
- * first get the last recorded transaction in the log.
- */
- TransGetLastRecordedTransaction(logRelation, logLastXid, &fail);
- if (fail == true)
- elog(ERROR, "TransRecover: failed TransGetLastRecordedTransaction");
-
- /*
- * next get the "last" and "next" variables
- */
- VariableRelationGetLastXid(&varLastXid);
- VariableRelationGetNextXid(&varNextXid);
-
- /*
- * intregity test (1)
- */
- if (TransactionIdIsLessThan(varNextXid, logLastXid))
- elog(ERROR, "TransRecover: varNextXid < logLastXid");
-
- /*
- * intregity test (2)
- */
-
- /*
- * intregity test (3)
- */
-
- /*
- * here we have a valid "
- *
- **** RESUME HERE ****
- */
- varNextXid = TransactionIdDup(varLastXid);
- TransactionIdIncrement(&varNextXid);
-
- VarPut(var, VAR_PUT_LASTXID, varLastXid);
- VarPut(var, VAR_PUT_NEXTXID, varNextXid);
-#endif
}
/* ----------------------------------------------------------------
* so they are guaranteed to exist)
*/
logRelation = heap_openr(LogRelationName, NoLock);
- VariableRelation = heap_openr(VariableRelationName, NoLock);
/*
* XXX TransactionLogUpdate requires that LogRelation is valid so we
#
# Makefile for catalog
#
-# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.32 2000/10/28 22:14:14 petere Exp $
+# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.33 2001/05/14 20:30:19 momjian Exp $
#
#-------------------------------------------------------------------------
pg_proc.h pg_type.h pg_attribute.h pg_class.h \
pg_inherits.h pg_index.h pg_statistic.h \
pg_operator.h pg_opclass.h pg_am.h pg_amop.h pg_amproc.h \
- pg_language.h pg_largeobject.h \
- pg_aggregate.h pg_ipl.h pg_inheritproc.h \
+ pg_language.h pg_largeobject.h pg_aggregate.h \
pg_rewrite.h pg_listener.h pg_description.h indexing.h \
)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.164 2001/05/09 21:13:35 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.165 2001/05/14 20:30:19 momjian Exp $
*
*
* INTERFACE ROUTINES
#include "catalog/pg_attrdef.h"
#include "catalog/pg_inherits.h"
#include "catalog/pg_index.h"
-#include "catalog/pg_ipl.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_relcheck.h"
#include "catalog/pg_statistic.h"
tblNode = InvalidOid;
relid = RelOid_pg_database;
}
- else if (strcmp(VariableRelationName, relname) == 0)
- {
- tblNode = InvalidOid;
- relid = RelOid_pg_variable;
- }
else if (strcmp(LogRelationName, relname) == 0)
{
tblNode = InvalidOid;
heap_endscan(scan);
heap_close(catalogRelation, RowExclusiveLock);
-
- /*
- * now remove dead IPL tuples
- */
- catalogRelation = heap_openr(InheritancePrecidenceListRelationName,
- RowExclusiveLock);
-
- entry.sk_attno = Anum_pg_ipl_iplrelid;
-
- scan = heap_beginscan(catalogRelation,
- false,
- SnapshotNow,
- 1,
- &entry);
-
- while (HeapTupleIsValid(tuple = heap_getnext(scan, 0)))
- simple_heap_delete(catalogRelation, &tuple->t_self);
-
- heap_endscan(scan);
- heap_close(catalogRelation, RowExclusiveLock);
}
/* --------------------------------
foreach(listptr2, rawConstraints)
{
Constraint *cdef2 = (Constraint *) lfirst(listptr2);
-
+
if (cdef2 == cdef ||
cdef2->contype != CONSTR_CHECK ||
cdef2->raw_expr == NULL ||
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.76 2001/04/02 18:30:49 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.77 2001/05/14 20:30:20 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "catalog/indexing.h"
#include "catalog/heap.h"
#include "catalog/pg_inherits.h"
-#include "catalog/pg_ipl.h"
#include "catalog/pg_type.h"
#include "commands/creatinh.h"
#include "miscadmin.h"
goto again;
}
}
-
- /*
- * Catalog IPL information using expanded list.
- */
- relation = heap_openr(InheritancePrecidenceListRelationName, RowExclusiveLock);
- desc = RelationGetDescr(relation);
-
- seqNumber = 1;
-
- foreach(entry, supers)
- {
- Datum datum[Natts_pg_ipl];
- char nullarr[Natts_pg_ipl];
-
- datum[0] = ObjectIdGetDatum(relationId); /* iplrel */
- datum[1] = ObjectIdGetDatum(lfirsti(entry));
- /* iplinherits */
- datum[2] = Int16GetDatum(seqNumber); /* iplseqno */
-
- nullarr[0] = ' ';
- nullarr[1] = ' ';
- nullarr[2] = ' ';
-
- tuple = heap_formtuple(desc, datum, nullarr);
-
- heap_insert(relation, tuple);
- heap_freetuple(tuple);
-
- seqNumber += 1;
- }
-
- heap_close(relation, RowExclusiveLock);
}
/*
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.225 2001/05/09 16:50:44 petere Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.226 2001/05/14 20:30:20 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
| ColId
{
/* disallow refs to variable system tables */
- if (strcmp(LogRelationName, $1) == 0
- || strcmp(VariableRelationName, $1) == 0)
+ if (strcmp(LogRelationName, $1) == 0)
elog(ERROR,"%s cannot be accessed by users",$1);
else
$$ = $1;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.131 2001/04/02 23:30:04 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.132 2001/05/14 20:30:20 momjian Exp $
*
*-------------------------------------------------------------------------
*/
formrdesc(AttributeRelationName, Natts_pg_attribute, Desc_pg_attribute);
formrdesc(ProcedureRelationName, Natts_pg_proc, Desc_pg_proc);
formrdesc(TypeRelationName, Natts_pg_type, Desc_pg_type);
- formrdesc(VariableRelationName, Natts_pg_variable, Desc_pg_variable);
formrdesc(LogRelationName, Natts_pg_log, Desc_pg_log);
/*
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/init/globals.c,v 1.56 2001/05/12 01:48:49 petere Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/init/globals.c,v 1.57 2001/05/14 20:30:21 momjian Exp $
*
* NOTES
* Globals used all over the place should be declared here and not
GroupSysidIndex,
LogRelationName,
ShadowRelationName,
- VariableRelationName,
0
};
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: transam.h,v 1.32 2001/03/22 04:00:31 momjian Exp $
+ * $Id: transam.h,v 1.33 2001/05/14 20:30:21 momjian Exp $
*
* NOTES
* Transaction System Version 101 now support proper oid
typedef LogRelationContentsData *LogRelationContents;
-/* ----------------
- * VariableRelationContents structure
- *
- * The variable relation is a special "relation" which
- * is used to store various system "variables" persistantly.
- * Unlike other relations in the system, this relation
- * is updated in place whenever the variables change.
- *
- * The first 4 bytes of this relation store the version
- * number of the transaction system.
- *
- * Currently, the relation has only one page and the next
- * available xid, the last committed xid and the next
- * available oid are stored there.
- *
- * XXX As of 7.1, pg_variable isn't used anymore; this is dead code.
- * ----------------
- */
-#ifdef NOT_USED
-typedef struct VariableRelationContentsData
-{
- XLogRecPtr LSN;
- int TransSystemVersion;
- TransactionId nextXidData;
- TransactionId lastXidData; /* unused */
- Oid nextOid;
-} VariableRelationContentsData;
-
-typedef VariableRelationContentsData *VariableRelationContents;
-
-#endif /* NOT_USED */
-
/*
* VariableCache is placed in shmem and used by
* backends to get next available XID & OID.
bool *failP);
/* in transam/varsup.c */
-extern void VariableRelationPutNextXid(TransactionId xid);
extern void GetNewTransactionId(TransactionId *xid);
extern void ReadNewTransactionId(TransactionId *xid);
extern void GetNewObjectId(Oid *oid_return);
/* in transam.c */
extern Relation LogRelation;
-extern Relation VariableRelation;
extern TransactionId cachedTestXid;
extern XidStatus cachedTestXidStatus;
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: catname.h,v 1.18 2001/01/24 19:43:20 momjian Exp $
+ * $Id: catname.h,v 1.19 2001/05/14 20:30:21 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#define DescriptionRelationName "pg_description"
#define GroupRelationName "pg_group"
#define IndexRelationName "pg_index"
-#define InheritProcedureRelationName "pg_inheritproc"
#define InheritsRelationName "pg_inherits"
-#define InheritancePrecidenceListRelationName "pg_ipl"
#define LanguageRelationName "pg_language"
#define LargeObjectRelationName "pg_largeobject"
#define ListenerRelationName "pg_listener"
#define ShadowRelationName "pg_shadow"
#define StatisticRelationName "pg_statistic"
#define TypeRelationName "pg_type"
-#define VariableRelationName "pg_variable"
#define VersionRelationName "pg_version"
#define AttrDefaultRelationName "pg_attrdef"
#define RelCheckRelationName "pg_relcheck"
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: catversion.h,v 1.72 2001/05/10 22:39:24 momjian Exp $
+ * $Id: catversion.h,v 1.73 2001/05/14 20:30:21 momjian Exp $
*
*-------------------------------------------------------------------------
*/
*/
/* yyyymmddN */
-#define CATALOG_VERSION_NO 200105101
+#define CATALOG_VERSION_NO 2001051401
#endif
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_class.h,v 1.48 2001/05/07 00:43:25 tgl Exp $
+ * $Id: pg_class.h,v 1.49 2001/05/14 20:30:21 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
DESCR("");
DATA(insert OID = 1262 ( pg_database 88 PGUID 0 1262 0 0 0 0 f t r 7 0 0 0 0 0 f f f _null_ ));
DESCR("");
-DATA(insert OID = 1264 ( pg_variable 90 PGUID 0 1264 0 0 0 0 f t s 1 0 0 0 0 0 f f f _null_ ));
-DESCR("");
DATA(insert OID = 1269 ( pg_log 99 PGUID 0 1269 0 0 0 0 f t s 1 0 0 0 0 0 f f f _null_ ));
DESCR("");
DATA(insert OID = 376 ( pg_xactlock 0 PGUID 0 0 0 0 0 0 f t s 1 0 0 0 0 0 f f f _null_ ));
#define RelOid_pg_shadow 1260
#define RelOid_pg_group 1261
#define RelOid_pg_database 1262
-#define RelOid_pg_variable 1264
#define RelOid_pg_log 1269
#define RelOid_pg_attrdef 1215
#define RelOid_pg_relcheck 1216
+++ /dev/null
-/*-------------------------------------------------------------------------
- *
- * pg_inheritproc.h
- * definition of the system "inheritproc" relation (pg_inheritproc)
- * along with the relation's initial contents.
- *
- *
- * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * $Id: pg_inheritproc.h,v 1.10 2001/01/24 19:43:21 momjian Exp $
- *
- * NOTES
- * the genbki.sh script reads this file and generates .bki
- * information from the DATA() statements.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_INHERITPROC_H
-#define PG_INHERITPROC_H
-
-/* ----------------
- * postgres.h contains the system type definintions and the
- * CATALOG(), BOOTSTRAP and DATA() sugar words so this file
- * can be read by both genbki.sh and the C compiler.
- * ----------------
- */
-
-/* ----------------
- * pg_inheritproc definition. cpp turns this into
- * typedef struct FormData_pg_inheritproc
- * ----------------
- */
-CATALOG(pg_inheritproc)
-{
- NameData inhproname;
- Oid inhargrelid;
- Oid inhdefrelid;
- Oid inhproc;
-} FormData_pg_inheritproc;
-
-/* ----------------
- * Form_pg_inheritproc corresponds to a pointer to a tuple with
- * the format of pg_inheritproc relation.
- * ----------------
- */
-typedef FormData_pg_inheritproc *Form_pg_inheritproc;
-
-/* ----------------
- * compiler constants for pg_inheritproc
- * ----------------
- */
-#define Natts_pg_inheritproc 4
-#define Anum_pg_inheritproc_inhproname 1
-#define Anum_pg_inheritproc_inhargrelid 2
-#define Anum_pg_inheritproc_inhdefrelid 3
-#define Anum_pg_inheritproc_inhproc 4
-
-
-#endif /* PG_INHERITPROC_H */
+++ /dev/null
-/*-------------------------------------------------------------------------
- *
- * pg_ipl.h
- * definition of the system "ipl" relation (pg_ipl)
- * along with the relation's initial contents.
- *
- *
- * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * $Id: pg_ipl.h,v 1.9 2001/01/24 19:43:21 momjian Exp $
- *
- * NOTES
- * the genbki.sh script reads this file and generates .bki
- * information from the DATA() statements.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_IPL_H
-#define PG_IPL_H
-
-/* ----------------
- * postgres.h contains the system type definintions and the
- * CATALOG(), BOOTSTRAP and DATA() sugar words so this file
- * can be read by both genbki.sh and the C compiler.
- * ----------------
- */
-
-/* ----------------
- * pg_ipl definition. cpp turns this into
- * typedef struct FormData_pg_ipl
- * ----------------
- */
-CATALOG(pg_ipl)
-{
- Oid iplrelid;
- Oid iplipl;
- int4 iplseqno;
-} FormData_pg_ipl;
-
-/* ----------------
- * Form_pg_ipl corresponds to a pointer to a tuple with
- * the format of pg_ipl relation.
- * ----------------
- */
-typedef FormData_pg_ipl *Form_pg_ipl;
-
-/* ----------------
- * compiler constants for pg_ipl
- * ----------------
- */
-#define Natts_pg_ipl 3
-#define Anum_pg_ipl_iplrelid 1
-#define Anum_pg_ipl_iplipl 2
-#define Anum_pg_ipl_iplseqno 3
-
-
-#endif /* PG_IPL_H */
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_type.h,v 1.104 2001/05/03 16:18:02 tgl Exp $
+ * $Id: pg_type.h,v 1.105 2001/05/14 20:30:21 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
DATA(insert OID = 86 ( pg_shadow PGUID 4 4 t c t \054 1260 0 int4in int4out int4in int4out i p _null_));
DATA(insert OID = 87 ( pg_group PGUID 4 4 t c t \054 1261 0 int4in int4out int4in int4out i p _null_));
DATA(insert OID = 88 ( pg_database PGUID 4 4 t c t \054 1262 0 int4in int4out int4in int4out i p _null_));
-DATA(insert OID = 90 ( pg_variable PGUID 4 4 t c t \054 1264 0 int4in int4out int4in int4out i p _null_));
DATA(insert OID = 99 ( pg_log PGUID 4 4 t c t \054 1269 0 int4in int4out int4in int4out i p _null_));
/* OIDS 100 - 199 */
-TFormData_pg_group \
-TFormData_pg_index \
-TFormData_pg_inherits \
--TFormData_pg_ipl \
-TFormData_pg_language \
-TFormData_pg_largeobject \
-TFormData_pg_listener \
-TForm_pg_group \
-TForm_pg_index \
-TForm_pg_inherits \
--TForm_pg_ipl \
-TForm_pg_language \
-TForm_pg_largeobject \
-TForm_pg_log \