Commit 3d58a1c1 authored by Alvaro Herrera's avatar Alvaro Herrera

Remove traces of otherwise unused RELKIND_SPECIAL symbol. Leave the psql bits

in place though, so that it plays nicely with older servers.

Per discussion.
parent 22b118b5
<!-- $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 Documentation of the system catalogs, directed toward PostgreSQL developers
--> -->
...@@ -1386,7 +1386,7 @@ ...@@ -1386,7 +1386,7 @@
everything else that has columns or is otherwise similar to a everything else that has columns or is otherwise similar to a
table. This includes indexes (but see also table. This includes indexes (but see also
<structname>pg_index</structname>), sequences, views, composite types, <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 Below, when we mean all of these
kinds of objects we speak of <quote>relations</quote>. Not all kinds of objects we speak of <quote>relations</quote>. Not all
columns are meaningful for all relation types. columns are meaningful for all relation types.
...@@ -1540,7 +1540,7 @@ ...@@ -1540,7 +1540,7 @@
<entry> <entry>
<literal>r</> = ordinary table, <literal>i</> = index, <literal>r</> = ordinary table, <literal>i</> = index,
<literal>S</> = sequence, <literal>v</> = view, <literal>c</> = <literal>S</> = sequence, <literal>v</> = view, <literal>c</> =
composite type, <literal>s</> = special, <literal>t</> = TOAST composite type, <literal>t</> = TOAST
table table
</entry> </entry>
</row> </row>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * 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 * INTERFACE ROUTINES
...@@ -794,8 +794,8 @@ relation_close(Relation relation, LOCKMODE lockmode) ...@@ -794,8 +794,8 @@ relation_close(Relation relation, LOCKMODE lockmode)
* heap_open - open a heap relation by relation OID * heap_open - open a heap relation by relation OID
* *
* This is essentially relation_open plus check that the relation * This is essentially relation_open plus check that the relation
* is not an index or special relation. (The caller should also check * is not an index nor a composite type. (The caller should also
* that it's not a view before assuming it has storage.) * check that it's not a view before assuming it has storage.)
* ---------------- * ----------------
*/ */
Relation Relation
...@@ -810,11 +810,6 @@ heap_open(Oid relationId, LOCKMODE lockmode) ...@@ -810,11 +810,6 @@ heap_open(Oid relationId, LOCKMODE lockmode)
(errcode(ERRCODE_WRONG_OBJECT_TYPE), (errcode(ERRCODE_WRONG_OBJECT_TYPE),
errmsg("\"%s\" is an index", errmsg("\"%s\" is an index",
RelationGetRelationName(r)))); 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) else if (r->rd_rel->relkind == RELKIND_COMPOSITE_TYPE)
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_WRONG_OBJECT_TYPE), (errcode(ERRCODE_WRONG_OBJECT_TYPE),
...@@ -845,11 +840,6 @@ heap_openrv(const RangeVar *relation, LOCKMODE lockmode) ...@@ -845,11 +840,6 @@ heap_openrv(const RangeVar *relation, LOCKMODE lockmode)
(errcode(ERRCODE_WRONG_OBJECT_TYPE), (errcode(ERRCODE_WRONG_OBJECT_TYPE),
errmsg("\"%s\" is an index", errmsg("\"%s\" is an index",
RelationGetRelationName(r)))); 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) else if (r->rd_rel->relkind == RELKIND_COMPOSITE_TYPE)
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_WRONG_OBJECT_TYPE), (errcode(ERRCODE_WRONG_OBJECT_TYPE),
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * 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) ...@@ -1898,10 +1898,6 @@ getRelationDescription(StringInfo buffer, Oid relid)
appendStringInfo(buffer, _("index %s"), appendStringInfo(buffer, _("index %s"),
relname); relname);
break; break;
case RELKIND_SPECIAL:
appendStringInfo(buffer, _("special system relation %s"),
relname);
break;
case RELKIND_SEQUENCE: case RELKIND_SEQUENCE:
appendStringInfo(buffer, _("sequence %s"), appendStringInfo(buffer, _("sequence %s"),
relname); relname);
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* Copyright (c) 2000-2006, PostgreSQL Global Development Group * 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 "postgres_fe.h"
#include "describe.h" #include "describe.h"
...@@ -881,6 +881,7 @@ describeOneTableDetails(const char *schemaname, ...@@ -881,6 +881,7 @@ describeOneTableDetails(const char *schemaname,
schemaname, relationname); schemaname, relationname);
break; break;
case 's': case 's':
/* not used as of 8.2, but keep it for backwards compatibility */
printfPQExpBuffer(&title, _("Special relation \"%s.%s\""), printfPQExpBuffer(&title, _("Special relation \"%s.%s\""),
schemaname, relationname); schemaname, relationname);
break; break;
...@@ -1471,6 +1472,10 @@ listTables(const char *tabtypes, const char *pattern, bool verbose) ...@@ -1471,6 +1472,10 @@ listTables(const char *tabtypes, const char *pattern, bool verbose)
initPQExpBuffer(&buf); initPQExpBuffer(&buf);
/*
* Note: as of Pg 8.2, we no longer use relkind 's', but we keep it here
* for backwards compatibility.
*/
printfPQExpBuffer(&buf, printfPQExpBuffer(&buf,
"SELECT n.nspname as \"%s\",\n" "SELECT n.nspname as \"%s\",\n"
" c.relname as \"%s\",\n" " c.relname as \"%s\",\n"
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* Copyright (c) 2000-2006, PostgreSQL Global Development Group * 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 = { ...@@ -370,6 +370,10 @@ static const SchemaQuery Query_for_list_of_views = {
" UNION ALL SELECT 'all') ss "\ " UNION ALL SELECT 'all') ss "\
" WHERE substring(name,1,%d)='%s'" " 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 \ #define Query_for_list_of_system_relations \
"SELECT pg_catalog.quote_ident(relname) "\ "SELECT pg_catalog.quote_ident(relname) "\
" FROM pg_catalog.pg_class c, pg_catalog.pg_namespace n "\ " FROM pg_catalog.pg_class c, pg_catalog.pg_namespace n "\
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * 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 * NOTES
* the genbki.sh script reads this file and generates .bki * the genbki.sh script reads this file and generates .bki
...@@ -150,7 +150,6 @@ DESCR(""); ...@@ -150,7 +150,6 @@ DESCR("");
#define RELKIND_INDEX 'i' /* secondary index */ #define RELKIND_INDEX 'i' /* secondary index */
#define RELKIND_RELATION 'r' /* ordinary cataloged heap */ #define RELKIND_RELATION 'r' /* ordinary cataloged heap */
#define RELKIND_SPECIAL 's' /* special (non-heap) */
#define RELKIND_SEQUENCE 'S' /* SEQUENCE relation */ #define RELKIND_SEQUENCE 'S' /* SEQUENCE relation */
#define RELKIND_UNCATALOGED 'u' /* temporary heap */ #define RELKIND_UNCATALOGED 'u' /* temporary heap */
#define RELKIND_TOASTVALUE 't' /* moved off huge values */ #define RELKIND_TOASTVALUE 't' /* moved off huge values */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment