diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2006-05-28 02:27:08 +0000 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2006-05-28 02:27:08 +0000 |
commit | 3d58a1c168fafd4e31ba3ab2da1f83ee0ae03ab4 (patch) | |
tree | 58afe34a1f3e3c04565984167bdc10a8b1f86ad4 /src | |
parent | 22b118b530154c386d850bfe533c6609568724c5 (diff) | |
download | postgresql-3d58a1c168fafd4e31ba3ab2da1f83ee0ae03ab4.tar.gz postgresql-3d58a1c168fafd4e31ba3ab2da1f83ee0ae03ab4.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/access/heap/heapam.c | 16 | ||||
-rw-r--r-- | src/backend/catalog/dependency.c | 6 | ||||
-rw-r--r-- | src/bin/psql/describe.c | 7 | ||||
-rw-r--r-- | src/bin/psql/tab-complete.c | 6 | ||||
-rw-r--r-- | src/include/catalog/pg_class.h | 3 |
5 files changed, 16 insertions, 22 deletions
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index dcb9fc8fb64..15556fda538 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -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), diff --git a/src/backend/catalog/dependency.c b/src/backend/catalog/dependency.c index 3493c6c70b9..3543ac2280b 100644 --- a/src/backend/catalog/dependency.c +++ b/src/backend/catalog/dependency.c @@ -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); diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index d2c808f583d..44d16a4e4eb 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -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" diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index ad8f0f841b2..653e57023d8 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -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 "\ diff --git a/src/include/catalog/pg_class.h b/src/include/catalog/pg_class.h index 58bbf5c4418..a059ae9ddc3 100644 --- a/src/include/catalog/pg_class.h +++ b/src/include/catalog/pg_class.h @@ -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 */ |