in place though, so that it plays nicely with older servers.
Per discussion.
-<!-- $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>
*
*
* 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
* 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
(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),
(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),
* 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 $
*
*-------------------------------------------------------------------------
*/
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);
*
* 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"
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;
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"
*
* 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 $
*/
/*----------------------------------------------------------------------
" 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 "\
* 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
#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 */