Removal of pg_variable, pg_inheritproc, pg_ipl - Mailing list pgsql-patches

From Bruce Momjian
Subject Removal of pg_variable, pg_inheritproc, pg_ipl
Date
Msg-id 200105142130.f4ELUHi07388@candle.pha.pa.us
Whole thread Raw
Responses Re: Removal of pg_variable, pg_inheritproc, pg_ipl  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
The attached patch completes the following TODO item:

    * -Remove unused pg_variable, pg_inheritproc, pg_ipl tables

initdb everyone.  Sorry the ealier posting didn't have the patch
attached.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
? config.log
? config.cache
? config.status
? GNUmakefile
? contrib/retep/build
? contrib/retep/jars
? doc/src/sgml/catalog
? doc/src/sgml/ln8.html
? doc/src/sgml/preface.html
? doc/src/sgml/history.html
? doc/src/sgml/resources.html
? src/GNUmakefile
? src/Makefile.custom
? src/Makefile.global
? src/crtags
? src/log
? src/backend/postgres
? src/backend/catalog/global.description
? src/backend/catalog/global.bki
? src/backend/catalog/template1.bki
? src/backend/catalog/template1.description
? src/backend/port/Makefile
? src/bin/initdb/initdb
? src/bin/initlocation/initlocation
? src/bin/ipcclean/ipcclean
? src/bin/pg_config/pg_config
? src/bin/pg_ctl/pg_ctl
? src/bin/pg_dump/pg_dump
? src/bin/pg_dump/pg_restore
? src/bin/pg_dump/pg_dumpall
? src/bin/pg_id/pg_id
? src/bin/pg_passwd/pg_passwd
? src/bin/pgaccess/pgaccess
? src/bin/pgtclsh/Makefile.tkdefs
? src/bin/pgtclsh/Makefile.tcldefs
? src/bin/pgtclsh/pgtclsh
? src/bin/pgtclsh/pgtksh
? src/bin/psql/psql
? src/bin/scripts/createlang
? src/include/config.h
? src/include/stamp-h
? src/interfaces/ecpg/lib/libecpg.so.3.2.0
? src/interfaces/ecpg/lib/libecpg.so.3.3.0
? src/interfaces/ecpg/preproc/ecpg
? src/interfaces/jdbc/build
? src/interfaces/jdbc/jars
? src/interfaces/jdbc/org/postgresql/Driver.java
? src/interfaces/libpgeasy/libpgeasy.so.2.1
? src/interfaces/libpgeasy/libpgeasy.so.2.2
? src/interfaces/libpgtcl/libpgtcl.so.2.1
? src/interfaces/libpgtcl/libpgtcl.so.2.2
? src/interfaces/libpq/libpq.so.2.1
? src/interfaces/libpq/libpq.so.2.2
? src/interfaces/odbc/libpsqlodbc.so.0.26
? src/interfaces/odbc/libpsqlodbc.so.0.27
? src/interfaces/perl5/Makefile
? src/interfaces/perl5/blib
? src/interfaces/perl5/Pg.c
? src/interfaces/perl5/pm_to_blib
? src/interfaces/perl5/Pg.bs
? src/interfaces/python/Setup
? src/interfaces/python/Setup.in
? src/interfaces/python/Makefile.pre.in
? src/interfaces/python/sedscript
? src/interfaces/python/Makefile.pre
? src/interfaces/python/config.c
? src/interfaces/python/Makefile
? src/pl/plperl/Makefile
? src/pl/plperl/blib
? src/pl/plperl/pm_to_blib
? src/pl/plperl/SPI.c
? src/pl/plperl/plperl.bs
? src/pl/plpgsql/src/libplpgsql.so.1.0
? src/pl/tcl/Makefile.tcldefs
? src/pl/tcl/modules/pltcl_loadmod
? src/pl/tcl/modules/pltcl_delmod
? src/pl/tcl/modules/pltcl_listmod
Index: doc/TODO
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/doc/TODO,v
retrieving revision 1.455
retrieving revision 1.456
diff -c -r1.455 -r1.456
*** doc/TODO    2001/05/13 02:19:58    1.455
--- doc/TODO    2001/05/14 20:30:38    1.456
***************
*** 1,6 ****
  TODO list for PostgreSQL
  ========================
! Last updated:        Sat May 12 22:19:42 EDT 2001

  Current maintainer:    Bruce Momjian (pgman@candle.pha.pa.us)

--- 1,6 ----
  TODO list for PostgreSQL
  ========================
! Last updated:        Mon May 14 16:29:55 EDT 2001

  Current maintainer:    Bruce Momjian (pgman@candle.pha.pa.us)

***************
*** 130,136 ****
  * Add unique indexes on pg_database
  * Check all system tables and add unique indexes as needed
  * Remove pg_listener index
! * Remove unused pg_variable, pg_inheritproc, pg_ipl tables

  COMMANDS

--- 130,136 ----
  * Add unique indexes on pg_database
  * Check all system tables and add unique indexes as needed
  * Remove pg_listener index
! * -Remove unused pg_variable, pg_inheritproc, pg_ipl tables

  COMMANDS

Index: doc/src/sgml/catalogs.sgml
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/catalogs.sgml,v
retrieving revision 2.16
retrieving revision 2.17
diff -c -r2.16 -r2.17
*** doc/src/sgml/catalogs.sgml    2001/05/07 00:43:14    2.16
--- doc/src/sgml/catalogs.sgml    2001/05/14 20:30:19    2.17
***************
*** 1,6 ****
  <!--
   Documentation of the system catalogs, directed toward PostgreSQL developers
!  $Header: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/catalogs.sgml,v 2.16 2001/05/07 00:43:14 tgl Exp $
   -->

  <chapter id="catalogs">
--- 1,6 ----
  <!--
   Documentation of the system catalogs, directed toward PostgreSQL developers
!  $Header: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/catalogs.sgml,v 2.17 2001/05/14 20:30:19 momjian Exp $
   -->

  <chapter id="catalogs">
***************
*** 92,109 ****
       </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>
--- 92,99 ----
Index: src/backend/access/gist/gist.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/access/gist/gist.c,v
retrieving revision 1.73
diff -c -r1.73 gist.c
*** src/backend/access/gist/gist.c    2001/05/07 00:43:15    1.73
--- src/backend/access/gist/gist.c    2001/05/14 21:28:45
***************
*** 1127,1133 ****
          elog(ERROR, "initGISTstate: index %u not found",
               RelationGetRelid(index));
      itupform = (Form_pg_index) GETSTRUCT(htup);
-     giststate->haskeytype = itupform->indhaskeytype;
      indexrelid = itupform->indexrelid;
      ReleaseSysCache(htup);

--- 1127,1132 ----
Index: src/backend/access/transam/transam.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/access/transam/transam.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -c -r1.43 -r1.44
*** src/backend/access/transam/transam.c    2001/03/22 06:16:10    1.43
--- src/backend/access/transam/transam.c    2001/05/14 20:30:19    1.44
***************
*** 8,14 ****
   *
   *
   * IDENTIFICATION
!  *      $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.43 2001/03/22 06:16:10
momjianExp $ 
   *
   * NOTES
   *      This file contains the high level access-method interface to the
--- 8,14 ----
   *
   *
   * IDENTIFICATION
!  *      $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.44 2001/05/14 20:30:19
momjianExp $ 
   *
   * NOTES
   *      This file contains the high level access-method interface to the
***************
*** 38,44 ****
   */

  Relation    LogRelation = (Relation) NULL;
- Relation    VariableRelation = (Relation) NULL;

  /* ----------------
   *        global variables holding cached transaction id's and statuses.
--- 38,43 ----
***************
*** 283,328 ****
  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
  }

  /* ----------------------------------------------------------------
--- 282,287 ----
***************
*** 386,392 ****
       * 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
--- 345,350 ----
Index: src/backend/catalog/Makefile
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/catalog/Makefile,v
retrieving revision 1.32
retrieving revision 1.33
diff -c -r1.32 -r1.33
*** src/backend/catalog/Makefile    2000/10/28 22:14:14    1.32
--- src/backend/catalog/Makefile    2001/05/14 20:30:19    1.33
***************
*** 2,8 ****
  #
  # Makefile for catalog
  #
! # $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/catalog/Makefile,v 1.32 2000/10/28 22:14:14 petere Exp $
  #
  #-------------------------------------------------------------------------

--- 2,8 ----
  #
  # Makefile for catalog
  #
! # $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/catalog/Makefile,v 1.33 2001/05/14 20:30:19 momjian Exp $
  #
  #-------------------------------------------------------------------------

***************
*** 30,37 ****
      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_rewrite.h pg_listener.h pg_description.h indexing.h \
      )

--- 30,36 ----
      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_rewrite.h pg_listener.h pg_description.h indexing.h \
      )

Index: src/backend/catalog/heap.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/catalog/heap.c,v
retrieving revision 1.164
retrieving revision 1.165
diff -c -r1.164 -r1.165
*** src/backend/catalog/heap.c    2001/05/09 21:13:35    1.164
--- src/backend/catalog/heap.c    2001/05/14 20:30:19    1.165
***************
*** 8,14 ****
   *
   *
   * IDENTIFICATION
!  *      $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/catalog/heap.c,v 1.164 2001/05/09 21:13:35 momjian
Exp$ 
   *
   *
   * INTERFACE ROUTINES
--- 8,14 ----
   *
   *
   * IDENTIFICATION
!  *      $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/catalog/heap.c,v 1.165 2001/05/14 20:30:19 momjian
Exp$ 
   *
   *
   * INTERFACE ROUTINES
***************
*** 39,45 ****
  #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"
--- 39,44 ----
***************
*** 258,268 ****
              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;
--- 257,262 ----
***************
*** 989,1014 ****

      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);
  }

  /* --------------------------------
--- 983,988 ----
***************
*** 1858,1864 ****
                      foreach(listptr2, rawConstraints)
                      {
                          Constraint *cdef2 = (Constraint *) lfirst(listptr2);
!
                          if (cdef2 == cdef ||
                              cdef2->contype != CONSTR_CHECK ||
                              cdef2->raw_expr == NULL ||
--- 1832,1838 ----
                      foreach(listptr2, rawConstraints)
                      {
                          Constraint *cdef2 = (Constraint *) lfirst(listptr2);
!
                          if (cdef2 == cdef ||
                              cdef2->contype != CONSTR_CHECK ||
                              cdef2->raw_expr == NULL ||
Index: src/backend/catalog/index.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/catalog/index.c,v
retrieving revision 1.146
diff -c -r1.146 index.c
*** src/backend/catalog/index.c    2001/05/07 00:43:17    1.146
--- src/backend/catalog/index.c    2001/05/14 21:28:48
***************
*** 587,595 ****
      indexForm->indexrelid = indexoid;
      indexForm->indrelid = heapoid;
      indexForm->indproc = indexInfo->ii_FuncOid;
-     indexForm->indisclustered = false;
      indexForm->indislossy = islossy;
-     indexForm->indhaskeytype = true;    /* not actually used anymore */
      indexForm->indisunique = indexInfo->ii_Unique;
      indexForm->indisprimary = primary;
      memcpy((char *) &indexForm->indpred, (char *) predText, predLen);
--- 587,593 ----
Index: src/backend/commands/creatinh.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/commands/creatinh.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -c -r1.76 -r1.77
*** src/backend/commands/creatinh.c    2001/04/02 18:30:49    1.76
--- src/backend/commands/creatinh.c    2001/05/14 20:30:20    1.77
***************
*** 8,14 ****
   *
   *
   * IDENTIFICATION
!  *      $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/commands/creatinh.c,v 1.76 2001/04/02 18:30:49 tgl
Exp$ 
   *
   *-------------------------------------------------------------------------
   */
--- 8,14 ----
   *
   *
   * IDENTIFICATION
!  *      $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/commands/creatinh.c,v 1.77 2001/05/14 20:30:20
momjianExp $ 
   *
   *-------------------------------------------------------------------------
   */
***************
*** 20,26 ****
  #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"
--- 20,25 ----
***************
*** 786,823 ****
              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);
  }

  /*
--- 785,790 ----
Index: src/backend/optimizer/plan/initsplan.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/optimizer/plan/initsplan.c,v
retrieving revision 1.61
retrieving revision 1.60
diff -c -r1.61 -r1.60
*** src/backend/optimizer/plan/initsplan.c    2001/05/14 20:25:00    1.61
--- src/backend/optimizer/plan/initsplan.c    2001/05/07 00:43:21    1.60
***************
*** 8,14 ****
   *
   *
   * IDENTIFICATION
!  *      $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/optimizer/plan/initsplan.c,v 1.61 2001/05/14 20:25:00
tglExp $ 
   *
   *-------------------------------------------------------------------------
   */
--- 8,14 ----
   *
   *
   * IDENTIFICATION
!  *      $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/optimizer/plan/initsplan.c,v 1.60 2001/05/07 00:43:21
tglExp $ 
   *
   *-------------------------------------------------------------------------
   */
***************
*** 298,326 ****

      foreach(relid, rels)
      {
!         int            relno = lfirsti(relid);
!         RelOptInfo *rel = get_base_rel(root, relno);

          /*
           * Since we do this bottom-up, any outer-rels previously marked
           * should be within the new outer join set.
           */
          Assert(is_subseti(rel->outerjoinset, outerrels));
-
-         /*
-          * Presently the executor cannot support FOR UPDATE marking of
-          * rels appearing on the nullable side of an outer join.
-          * (It's somewhat unclear what that would mean, anyway: what should
-          * we mark when a result row is generated from no element of the
-          * nullable relation?)  So, complain if target rel is FOR UPDATE.
-          * It's sufficient to make this check once per rel, so do it only
-          * if rel wasn't already known nullable.
-          */
-         if (rel->outerjoinset == NIL)
-         {
-             if (intMember(relno, root->rowMarks))
-                 elog(ERROR, "SELECT FOR UPDATE cannot be applied to the nullable side of an OUTER JOIN");
-         }

          rel->outerjoinset = outerrels;
      }
--- 298,310 ----

      foreach(relid, rels)
      {
!         RelOptInfo *rel = get_base_rel(root, lfirsti(relid));

          /*
           * Since we do this bottom-up, any outer-rels previously marked
           * should be within the new outer join set.
           */
          Assert(is_subseti(rel->outerjoinset, outerrels));

          rel->outerjoinset = outerrels;
      }
Index: src/backend/parser/gram.y
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/parser/gram.y,v
retrieving revision 2.225
retrieving revision 2.226
diff -c -r2.225 -r2.226
*** src/backend/parser/gram.y    2001/05/09 16:50:44    2.225
--- src/backend/parser/gram.y    2001/05/14 20:30:20    2.226
***************
*** 11,17 ****
   *
   *
   * IDENTIFICATION
!  *      $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/parser/gram.y,v 2.225 2001/05/09 16:50:44 petere Exp
$
   *
   * HISTORY
   *      AUTHOR            DATE            MAJOR EVENT
--- 11,17 ----
   *
   *
   * IDENTIFICATION
!  *      $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/parser/gram.y,v 2.226 2001/05/14 20:30:20 momjian Exp
$
   *
   * HISTORY
   *      AUTHOR            DATE            MAJOR EVENT
***************
*** 5301,5308 ****
          | ColId
                  {
                      /* disallow refs to variable system tables */
!                     if (strcmp(LogRelationName, $1) == 0
!                         || strcmp(VariableRelationName, $1) == 0)
                          elog(ERROR,"%s cannot be accessed by users",$1);
                      else
                          $$ = $1;
--- 5301,5307 ----
          | ColId
                  {
                      /* disallow refs to variable system tables */
!                     if (strcmp(LogRelationName, $1) == 0)
                          elog(ERROR,"%s cannot be accessed by users",$1);
                      else
                          $$ = $1;
Index: src/backend/utils/cache/relcache.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/cache/relcache.c,v
retrieving revision 1.131
diff -c -r1.131 relcache.c
*** src/backend/utils/cache/relcache.c    2001/04/02 23:30:04    1.131
--- src/backend/utils/cache/relcache.c    2001/05/14 21:28:52
***************
*** 8,14 ****
   *
   *
   * IDENTIFICATION
!  *      $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.131 2001/04/02 23:30:04
tglExp $ 
   *
   *-------------------------------------------------------------------------
   */
--- 8,14 ----
   *
   *
   * IDENTIFICATION
!  *      $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.132 2001/05/14 20:30:20
momjianExp $ 
   *
   *-------------------------------------------------------------------------
   */
***************
*** 70,76 ****
  static FormData_pg_attribute Desc_pg_attribute[Natts_pg_attribute] = {Schema_pg_attribute};
  static FormData_pg_attribute Desc_pg_proc[Natts_pg_proc] = {Schema_pg_proc};
  static FormData_pg_attribute Desc_pg_type[Natts_pg_type] = {Schema_pg_type};
- static FormData_pg_attribute Desc_pg_variable[Natts_pg_variable] = {Schema_pg_variable};
  static FormData_pg_attribute Desc_pg_log[Natts_pg_log] = {Schema_pg_log};

  /*
--- 70,75 ----
***************
*** 2117,2123 ****
      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);

      /*
--- 2116,2121 ----
Index: src/backend/utils/init/globals.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/init/globals.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -c -r1.56 -r1.57
*** src/backend/utils/init/globals.c    2001/05/12 01:48:49    1.56
--- src/backend/utils/init/globals.c    2001/05/14 20:30:21    1.57
***************
*** 8,14 ****
   *
   *
   * IDENTIFICATION
!  *      $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/init/globals.c,v 1.56 2001/05/12 01:48:49
petereExp $ 
   *
   * NOTES
   *      Globals used all over the place should be declared here and not
--- 8,14 ----
   *
   *
   * IDENTIFICATION
!  *      $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/init/globals.c,v 1.57 2001/05/14 20:30:21
momjianExp $ 
   *
   * NOTES
   *      Globals used all over the place should be declared here and not
***************
*** 115,120 ****
      GroupSysidIndex,
      LogRelationName,
      ShadowRelationName,
-     VariableRelationName,
      0
  };
--- 115,119 ----
Index: src/include/access/transam.h
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/include/access/transam.h,v
retrieving revision 1.32
retrieving revision 1.33
diff -c -r1.32 -r1.33
*** src/include/access/transam.h    2001/03/22 04:00:31    1.32
--- src/include/access/transam.h    2001/05/14 20:30:21    1.33
***************
*** 7,13 ****
   * 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 $
   *
   *     NOTES
   *        Transaction System Version 101 now support proper oid
--- 7,13 ----
   * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
   * Portions Copyright (c) 1994, Regents of the University of California
   *
!  * $Id: transam.h,v 1.33 2001/05/14 20:30:21 momjian Exp $
   *
   *     NOTES
   *        Transaction System Version 101 now support proper oid
***************
*** 91,128 ****

  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.
--- 91,96 ----
***************
*** 161,167 ****
                               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);
--- 129,134 ----
***************
*** 174,180 ****

  /* in transam.c */
  extern Relation LogRelation;
- extern Relation VariableRelation;

  extern TransactionId cachedTestXid;
  extern XidStatus cachedTestXidStatus;
--- 141,146 ----
Index: src/include/catalog/catname.h
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/include/catalog/catname.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -c -r1.18 -r1.19
*** src/include/catalog/catname.h    2001/01/24 19:43:20    1.18
--- src/include/catalog/catname.h    2001/05/14 20:30:21    1.19
***************
*** 7,13 ****
   * 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 $
   *
   *-------------------------------------------------------------------------
   */
--- 7,13 ----
   * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
   * Portions Copyright (c) 1994, Regents of the University of California
   *
!  * $Id: catname.h,v 1.19 2001/05/14 20:30:21 momjian Exp $
   *
   *-------------------------------------------------------------------------
   */
***************
*** 25,33 ****
  #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"
--- 25,31 ----
***************
*** 40,46 ****
  #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"
--- 38,43 ----
Index: src/include/catalog/catversion.h
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/include/catalog/catversion.h,v
retrieving revision 1.72
diff -c -r1.72 catversion.h
*** src/include/catalog/catversion.h    2001/05/10 22:39:24    1.72
--- src/include/catalog/catversion.h    2001/05/14 21:28:53
***************
*** 37,43 ****
   * 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 $
   *
   *-------------------------------------------------------------------------
   */
--- 37,43 ----
   * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
   * Portions Copyright (c) 1994, Regents of the University of California
   *
!  * $Id: catversion.h,v 1.73 2001/05/14 20:30:21 momjian Exp $
   *
   *-------------------------------------------------------------------------
   */
***************
*** 53,58 ****
   */

  /*                            yyyymmddN */
! #define CATALOG_VERSION_NO    200105101

  #endif
--- 53,58 ----
   */

  /*                            yyyymmddN */
! #define CATALOG_VERSION_NO    2001051402

  #endif
Index: src/include/catalog/pg_class.h
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/include/catalog/pg_class.h,v
retrieving revision 1.48
retrieving revision 1.49
diff -c -r1.48 -r1.49
*** src/include/catalog/pg_class.h    2001/05/07 00:43:25    1.48
--- src/include/catalog/pg_class.h    2001/05/14 20:30:21    1.49
***************
*** 8,14 ****
   * 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 $
   *
   * NOTES
   *      the genbki.sh script reads this file and generates .bki
--- 8,14 ----
   * 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.49 2001/05/14 20:30:21 momjian Exp $
   *
   * NOTES
   *      the genbki.sh script reads this file and generates .bki
***************
*** 146,153 ****
  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_ ));
--- 146,151 ----
***************
*** 166,172 ****
  #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
--- 164,169 ----
Index: src/include/catalog/pg_index.h
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/include/catalog/pg_index.h,v
retrieving revision 1.16
diff -c -r1.16 pg_index.h
*** src/include/catalog/pg_index.h    2001/01/24 19:43:21    1.16
--- src/include/catalog/pg_index.h    2001/05/14 21:28:53
***************
*** 48,54 ****
                                   * index */
      int2vector    indkey;
      oidvector    indclass;
-     bool        indisclustered;
      bool        indislossy;        /* do we fetch false tuples (lossy
                                   * compression)? */
      bool        indhaskeytype;    /* does key type != attribute type? */
--- 48,53 ----
***************
*** 70,87 ****
   *        compiler constants for pg_index
   * ----------------
   */
! #define Natts_pg_index                    12
  #define Anum_pg_index_indexrelid        1
  #define Anum_pg_index_indrelid            2
  #define Anum_pg_index_indproc            3
  #define Anum_pg_index_indkey            4
  #define Anum_pg_index_indclass            5
! #define Anum_pg_index_indisclustered    6
! #define Anum_pg_index_indislossy        7
! #define Anum_pg_index_indhaskeytype        8
! #define Anum_pg_index_indisunique        9
! #define Anum_pg_index_indisprimary        10
! #define Anum_pg_index_indreference        11
! #define Anum_pg_index_indpred            12

  #endif     /* PG_INDEX_H */
--- 69,84 ----
   *        compiler constants for pg_index
   * ----------------
   */
! #define Natts_pg_index                    10
  #define Anum_pg_index_indexrelid        1
  #define Anum_pg_index_indrelid            2
  #define Anum_pg_index_indproc            3
  #define Anum_pg_index_indkey            4
  #define Anum_pg_index_indclass            5
! #define Anum_pg_index_indislossy        6
! #define Anum_pg_index_indisunique        7
! #define Anum_pg_index_indisprimary        8
! #define Anum_pg_index_indreference        9
! #define Anum_pg_index_indpred            10

  #endif     /* PG_INDEX_H */
Index: src/include/catalog/pg_type.h
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/include/catalog/pg_type.h,v
retrieving revision 1.104
retrieving revision 1.105
diff -c -r1.104 -r1.105
*** src/include/catalog/pg_type.h    2001/05/03 16:18:02    1.104
--- src/include/catalog/pg_type.h    2001/05/14 20:30:21    1.105
***************
*** 8,14 ****
   * 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 $
   *
   * NOTES
   *      the genbki.sh script reads this file and generates .bki
--- 8,14 ----
   * 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.105 2001/05/14 20:30:21 momjian Exp $
   *
   * NOTES
   *      the genbki.sh script reads this file and generates .bki
***************
*** 239,245 ****
  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 */
--- 239,244 ----
Index: src/interfaces/odbc/info.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/odbc/info.c,v
retrieving revision 1.46
diff -c -r1.46 info.c
*** src/interfaces/odbc/info.c    2001/05/08 17:12:36    1.46
--- src/interfaces/odbc/info.c    2001/05/14 21:28:57
***************
*** 2009,2016 ****
      char       *table_name;
      char        index_name[MAX_INFO_STRING];
      short        fields_vector[16];
!     char        isunique[10],
!                 isclustered[10];
      SDWORD        index_name_len,
                  fields_vector_len;
      TupleNode  *row;
--- 2009,2015 ----
      char       *table_name;
      char        index_name[MAX_INFO_STRING];
      short        fields_vector[16];
!     char        isunique[10];
      SDWORD        index_name_len,
                  fields_vector_len;
      TupleNode  *row;
***************
*** 2170,2176 ****
      indx_stmt = (StatementClass *) hindx_stmt;

      sprintf(index_query, "select c.relname, i.indkey, i.indisunique"
!             ", i.indisclustered, c.relhasrules"
              " from pg_index i, pg_class c, pg_class d"
              " where c.oid = i.indexrelid and d.relname = '%s'"
              " and d.oid = i.indrelid", table_name);
--- 2169,2175 ----
      indx_stmt = (StatementClass *) hindx_stmt;

      sprintf(index_query, "select c.relname, i.indkey, i.indisunique"
!             ", c.relhasrules"
              " from pg_index i, pg_class c, pg_class d"
              " where c.oid = i.indexrelid and d.relname = '%s'"
              " and d.oid = i.indrelid", table_name);
***************
*** 2178,2184 ****
      result = SQLExecDirect(hindx_stmt, index_query, strlen(index_query));
      if ((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO))
      {
-
          /*
           * "Couldn't execute index query (w/SQLExecDirect) in
           * SQLStatistics.";
--- 2177,2182 ----
***************
*** 2226,2245 ****
          goto SEEYA;
      }

-     /* bind the "is clustered" column */
      result = SQLBindCol(hindx_stmt, 4, SQL_C_CHAR,
-                         isclustered, sizeof(isclustered), NULL);
-     if ((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO))
-     {
-         stmt->errormsg = indx_stmt->errormsg;    /* "Couldn't bind column
-                                                  * in SQLStatistics."; */
-         stmt->errornumber = indx_stmt->errornumber;
-         SQLFreeStmt(hindx_stmt, SQL_DROP);
-         goto SEEYA;
-
-     }
-
-     result = SQLBindCol(hindx_stmt, 5, SQL_C_CHAR,
                          relhasrules, MAX_INFO_STRING, NULL);
      if ((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO))
      {
--- 2224,2230 ----
***************
*** 2270,2279 ****
          sprintf(buf, "%s_idx_fake_oid", table_name);
          set_tuplefield_string(&row->tuple[5], buf);

-         /*
-          * Clustered index?  I think non-clustered should be type OTHER
-          * not HASHED
-          */
          set_tuplefield_int2(&row->tuple[6], (Int2) SQL_INDEX_OTHER);
          set_tuplefield_int2(&row->tuple[7], (Int2) 1);

--- 2255,2260 ----
***************
*** 2316,2326 ****
                  set_tuplefield_string(&row->tuple[4], "");
                  set_tuplefield_string(&row->tuple[5], index_name);

!                 /*
!                  * Clustered index?  I think non-clustered should be type
!                  * OTHER not HASHED
!                  */
!                 set_tuplefield_int2(&row->tuple[6], (Int2) (atoi(isclustered) ? SQL_INDEX_CLUSTERED :
SQL_INDEX_OTHER));
                  set_tuplefield_int2(&row->tuple[7], (Int2) (i + 1));

                  if (fields_vector[i] == OID_ATTNUM)
--- 2297,2303 ----
                  set_tuplefield_string(&row->tuple[4], "");
                  set_tuplefield_string(&row->tuple[5], index_name);

!                 set_tuplefield_int2(&row->tuple[6], (Int2) SQL_INDEX_OTHER);
                  set_tuplefield_int2(&row->tuple[7], (Int2) (i + 1));

                  if (fields_vector[i] == OID_ATTNUM)
Index: src/tools/pgindent/pgindent
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/tools/pgindent/pgindent,v
retrieving revision 1.23
retrieving revision 1.24
diff -c -r1.23 -r1.24
*** src/tools/pgindent/pgindent    2001/02/12 18:30:53    1.23
--- src/tools/pgindent/pgindent    2001/05/14 20:30:21    1.24
***************
*** 267,273 ****
  -TFormData_pg_group \
  -TFormData_pg_index \
  -TFormData_pg_inherits \
- -TFormData_pg_ipl \
  -TFormData_pg_language \
  -TFormData_pg_largeobject \
  -TFormData_pg_listener \
--- 267,272 ----
***************
*** 295,301 ****
  -TForm_pg_group \
  -TForm_pg_index \
  -TForm_pg_inherits \
- -TForm_pg_ipl \
  -TForm_pg_language \
  -TForm_pg_largeobject \
  -TForm_pg_log \
--- 294,299 ----

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Removal of pg_variable, pg_inheritproc, pg_ipl tables
Next
From: Bruce Momjian
Date:
Subject: Remove columns pg_index.haskeytype and pg_index.indisclustered