aboutsummaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/storage/smgr/Makefile2
-rw-r--r--src/backend/storage/smgr/README6
-rw-r--r--src/backend/storage/smgr/smgrtype.c80
3 files changed, 1 insertions, 87 deletions
diff --git a/src/backend/storage/smgr/Makefile b/src/backend/storage/smgr/Makefile
index 2b95cb0df16..e486b7c0d1c 100644
--- a/src/backend/storage/smgr/Makefile
+++ b/src/backend/storage/smgr/Makefile
@@ -12,6 +12,6 @@ subdir = src/backend/storage/smgr
top_builddir = ../../../..
include $(top_builddir)/src/Makefile.global
-OBJS = md.o smgr.o smgrtype.o
+OBJS = md.o smgr.o
include $(top_srcdir)/src/backend/common.mk
diff --git a/src/backend/storage/smgr/README b/src/backend/storage/smgr/README
index 37ed40b6450..e1cfc6cd264 100644
--- a/src/backend/storage/smgr/README
+++ b/src/backend/storage/smgr/README
@@ -31,12 +31,6 @@ The files in this directory, and their contents, are
md.c The "magnetic disk" storage manager, which is really just
an interface to the kernel's filesystem operations.
- smgrtype.c Storage manager type -- maps string names to storage manager
- IDs and provides simple comparison operators. This is the
- regproc support for type "smgr" in the system catalogs.
- (This is vestigial since no columns of type smgr exist
- in the catalogs anymore.)
-
Note that md.c in turn relies on src/backend/storage/file/fd.c.
diff --git a/src/backend/storage/smgr/smgrtype.c b/src/backend/storage/smgr/smgrtype.c
deleted file mode 100644
index cf12094da46..00000000000
--- a/src/backend/storage/smgr/smgrtype.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * smgrtype.c
- * storage manager type
- *
- * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- * src/backend/storage/smgr/smgrtype.c
- *
- *-------------------------------------------------------------------------
- */
-#include "postgres.h"
-
-#include "storage/smgr.h"
-#include "utils/builtins.h"
-
-
-typedef struct smgrid
-{
- const char *smgr_name;
-} smgrid;
-
-/*
- * StorageManager[] -- List of defined storage managers.
- */
-static const smgrid StorageManager[] = {
- {"magnetic disk"}
-};
-
-static const int NStorageManagers = lengthof(StorageManager);
-
-
-Datum
-smgrin(PG_FUNCTION_ARGS)
-{
- char *s = PG_GETARG_CSTRING(0);
- int16 i;
-
- for (i = 0; i < NStorageManagers; i++)
- {
- if (strcmp(s, StorageManager[i].smgr_name) == 0)
- PG_RETURN_INT16(i);
- }
- elog(ERROR, "unrecognized storage manager name \"%s\"", s);
- PG_RETURN_INT16(0);
-}
-
-Datum
-smgrout(PG_FUNCTION_ARGS)
-{
- int16 i = PG_GETARG_INT16(0);
- char *s;
-
- if (i >= NStorageManagers || i < 0)
- elog(ERROR, "invalid storage manager ID: %d", i);
-
- s = pstrdup(StorageManager[i].smgr_name);
- PG_RETURN_CSTRING(s);
-}
-
-Datum
-smgreq(PG_FUNCTION_ARGS)
-{
- int16 a = PG_GETARG_INT16(0);
- int16 b = PG_GETARG_INT16(1);
-
- PG_RETURN_BOOL(a == b);
-}
-
-Datum
-smgrne(PG_FUNCTION_ARGS)
-{
- int16 a = PG_GETARG_INT16(0);
- int16 b = PG_GETARG_INT16(1);
-
- PG_RETURN_BOOL(a != b);
-}