aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-08-03 19:19:38 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-08-03 19:19:38 +0000
commit61aca818c486dbe000ce94c77cb1dd1f379baf67 (patch)
tree6d266f3253db8cb2ea9d59bb63dff89f8f7a1c56 /src/backend/executor
parentc298d74d4957845bb03a67092c30b53e5e0d01c2 (diff)
downloadpostgresql-61aca818c486dbe000ce94c77cb1dd1f379baf67.tar.gz
postgresql-61aca818c486dbe000ce94c77cb1dd1f379baf67.zip
Modify heap_open()/heap_openr() API per pghackers discussion of 11 July.
These two routines will now ALWAYS elog() on failure, whether you ask for a lock or not. If you really want to get a NULL return on failure, call the new routines heap_open_nofail()/heap_openr_nofail(). By my count there are only about three places that actually want that behavior. There were rather more than three places that were missing the check they needed to make under the old convention :-(.
Diffstat (limited to 'src/backend/executor')
-rw-r--r--src/backend/executor/execAmi.c5
-rw-r--r--src/backend/executor/nodeTidscan.c4
2 files changed, 2 insertions, 7 deletions
diff --git a/src/backend/executor/execAmi.c b/src/backend/executor/execAmi.c
index c3cb019c89d..99d6b7b27be 100644
--- a/src/backend/executor/execAmi.c
+++ b/src/backend/executor/execAmi.c
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: execAmi.c,v 1.50 2000/07/25 23:43:38 tgl Exp $
+ * $Id: execAmi.c,v 1.51 2000/08/03 19:19:30 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -98,9 +98,6 @@ ExecOpenScanR(Oid relOid,
else
relation = heap_open(relOid, NoLock);
- if (relation == NULL)
- elog(ERROR, "ExecOpenScanR: failed to open relation %u", relOid);
-
scanDesc = ExecBeginScan(relation,
nkeys,
skeys,
diff --git a/src/backend/executor/nodeTidscan.c b/src/backend/executor/nodeTidscan.c
index 824ead5ec6b..ac6511dcbfb 100644
--- a/src/backend/executor/nodeTidscan.c
+++ b/src/backend/executor/nodeTidscan.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeTidscan.c,v 1.10 2000/07/12 02:37:04 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeTidscan.c,v 1.11 2000/08/03 19:19:30 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -481,8 +481,6 @@ ExecInitTidScan(TidScan *node, EState *estate, Plan *parent)
reloid = rtentry->relid;
currentRelation = heap_open(reloid, AccessShareLock);
- if (currentRelation == NULL)
- elog(ERROR, "ExecInitTidScan heap_open failed.");
scanstate->css_currentRelation = currentRelation;
scanstate->css_currentScanDesc = 0;