]> granicus.if.org Git - postgresql/commitdiff
Remove traces of otherwise unused RELKIND_SPECIAL symbol. Leave the psql bits
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Sun, 28 May 2006 02:27:08 +0000 (02:27 +0000)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Sun, 28 May 2006 02:27:08 +0000 (02:27 +0000)
in place though, so that it plays nicely with older servers.

Per discussion.

doc/src/sgml/catalogs.sgml
src/backend/access/heap/heapam.c
src/backend/catalog/dependency.c
src/bin/psql/describe.c
src/bin/psql/tab-complete.c
src/include/catalog/pg_class.h

index fe993aa4eeb7aa4caa61c38a18e6024bcc831d80..27ea27fec4e827f9a65b121477548724ced79365 100644 (file)
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/catalogs.sgml,v 2.122 2006/05/02 22:25:09 tgl Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/catalogs.sgml,v 2.123 2006/05/28 02:27:08 alvherre Exp $ -->
 <!--
  Documentation of the system catalogs, directed toward PostgreSQL developers
  -->
    everything else that has columns or is otherwise similar to a
    table.  This includes indexes (but see also
    <structname>pg_index</structname>), sequences, views, composite types,
-   and some kinds of special relation; see <structfield>relkind</>.
+   and TOAST tables; see <structfield>relkind</>.
    Below, when we mean all of these
    kinds of objects we speak of <quote>relations</quote>.  Not all
    columns are meaningful for all relation types.
       <entry>
        <literal>r</> = ordinary table, <literal>i</> = index,
        <literal>S</> = sequence, <literal>v</> = view, <literal>c</> =
-       composite type, <literal>s</> = special, <literal>t</> = TOAST
+       composite type, <literal>t</> = TOAST
        table
       </entry>
      </row>
index dcb9fc8fb64dca094b7345fde5f1fbfeacb7d40e..15556fda538c3cbd4c5b0b6ae170088b2fca232f 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/access/heap/heapam.c,v 1.212 2006/05/10 23:18:39 tgl Exp $
+ *       $PostgreSQL: pgsql/src/backend/access/heap/heapam.c,v 1.213 2006/05/28 02:27:08 alvherre Exp $
  *
  *
  * INTERFACE ROUTINES
@@ -794,8 +794,8 @@ relation_close(Relation relation, LOCKMODE lockmode)
  *             heap_open - open a heap relation by relation OID
  *
  *             This is essentially relation_open plus check that the relation
- *             is not an index or special relation.  (The caller should also check
- *             that it's not a view before assuming it has storage.)
+ *             is not an index nor a composite type.  (The caller should also
+ *             check that it's not a view before assuming it has storage.)
  * ----------------
  */
 Relation
@@ -810,11 +810,6 @@ heap_open(Oid relationId, LOCKMODE lockmode)
                                (errcode(ERRCODE_WRONG_OBJECT_TYPE),
                                 errmsg("\"%s\" is an index",
                                                RelationGetRelationName(r))));
-       else if (r->rd_rel->relkind == RELKIND_SPECIAL)
-               ereport(ERROR,
-                               (errcode(ERRCODE_WRONG_OBJECT_TYPE),
-                                errmsg("\"%s\" is a special relation",
-                                               RelationGetRelationName(r))));
        else if (r->rd_rel->relkind == RELKIND_COMPOSITE_TYPE)
                ereport(ERROR,
                                (errcode(ERRCODE_WRONG_OBJECT_TYPE),
@@ -845,11 +840,6 @@ heap_openrv(const RangeVar *relation, LOCKMODE lockmode)
                                (errcode(ERRCODE_WRONG_OBJECT_TYPE),
                                 errmsg("\"%s\" is an index",
                                                RelationGetRelationName(r))));
-       else if (r->rd_rel->relkind == RELKIND_SPECIAL)
-               ereport(ERROR,
-                               (errcode(ERRCODE_WRONG_OBJECT_TYPE),
-                                errmsg("\"%s\" is a special relation",
-                                               RelationGetRelationName(r))));
        else if (r->rd_rel->relkind == RELKIND_COMPOSITE_TYPE)
                ereport(ERROR,
                                (errcode(ERRCODE_WRONG_OBJECT_TYPE),
index 3493c6c70b9dd938ffd46b43a79a0d2917a680c9..3543ac2280b59e7d7271b453569b52c6b8ddcac1 100644 (file)
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/catalog/dependency.c,v 1.53 2006/04/30 01:08:06 momjian Exp $
+ *       $PostgreSQL: pgsql/src/backend/catalog/dependency.c,v 1.54 2006/05/28 02:27:08 alvherre Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1898,10 +1898,6 @@ getRelationDescription(StringInfo buffer, Oid relid)
                        appendStringInfo(buffer, _("index %s"),
                                                         relname);
                        break;
-               case RELKIND_SPECIAL:
-                       appendStringInfo(buffer, _("special system relation %s"),
-                                                        relname);
-                       break;
                case RELKIND_SEQUENCE:
                        appendStringInfo(buffer, _("sequence %s"),
                                                         relname);
index d2c808f583d07749dfdd3217fbb551f101fa425e..44d16a4e4ebc7f2861ec336ef3fd5eccc51bda81 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 2000-2006, PostgreSQL Global Development Group
  *
- * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.135 2006/05/26 23:48:54 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.136 2006/05/28 02:27:08 alvherre Exp $
  */
 #include "postgres_fe.h"
 #include "describe.h"
@@ -881,6 +881,7 @@ describeOneTableDetails(const char *schemaname,
                                                          schemaname, relationname);
                        break;
                case 's':
+                       /* not used as of 8.2, but keep it for backwards compatibility */
                        printfPQExpBuffer(&title, _("Special relation \"%s.%s\""),
                                                          schemaname, relationname);
                        break;
@@ -1471,6 +1472,10 @@ listTables(const char *tabtypes, const char *pattern, bool verbose)
 
        initPQExpBuffer(&buf);
 
+       /*
+        * Note: as of Pg 8.2, we no longer use relkind 's', but we keep it here
+        * for backwards compatibility.
+        */
        printfPQExpBuffer(&buf,
                                          "SELECT n.nspname as \"%s\",\n"
                                          "  c.relname as \"%s\",\n"
index ad8f0f841b238741afc768534818403e3f2a36d8..653e57023d8d6d3553c681d57ceb9ff88166a54d 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 2000-2006, PostgreSQL Global Development Group
  *
- * $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.151 2006/04/30 21:15:33 tgl Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.152 2006/05/28 02:27:08 alvherre Exp $
  */
 
 /*----------------------------------------------------------------------
@@ -370,6 +370,10 @@ static const SchemaQuery Query_for_list_of_views = {
 "  UNION ALL SELECT 'all') ss "\
 " WHERE substring(name,1,%d)='%s'"
 
+/*
+ * Note: As of Pg 8.2, we no longer use relkind 's', but we keep it here
+ * for compatibility with older servers
+ */
 #define Query_for_list_of_system_relations \
 "SELECT pg_catalog.quote_ident(relname) "\
 "  FROM pg_catalog.pg_class c, pg_catalog.pg_namespace n "\
index 58bbf5c44186bec93598d2e44833af51d0236408..a059ae9ddc39ad594b31eaa9a2e1f5ae7a5e3e28 100644 (file)
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_class.h,v 1.91 2006/03/05 15:58:54 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_class.h,v 1.92 2006/05/28 02:27:08 alvherre Exp $
  *
  * NOTES
  *       the genbki.sh script reads this file and generates .bki
@@ -150,7 +150,6 @@ DESCR("");
 
 #define                  RELKIND_INDEX                   'i'           /* secondary index */
 #define                  RELKIND_RELATION                'r'           /* ordinary cataloged heap */
-#define                  RELKIND_SPECIAL                 's'           /* special (non-heap) */
 #define                  RELKIND_SEQUENCE                'S'           /* SEQUENCE relation */
 #define                  RELKIND_UNCATALOGED     'u'           /* temporary heap */
 #define                  RELKIND_TOASTVALUE      't'           /* moved off huge values */