diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-08-03 19:19:38 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-08-03 19:19:38 +0000 |
| commit | 61aca818c486dbe000ce94c77cb1dd1f379baf67 (patch) | |
| tree | 6d266f3253db8cb2ea9d59bb63dff89f8f7a1c56 /src/include | |
| parent | c298d74d4957845bb03a67092c30b53e5e0d01c2 (diff) | |
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/include')
| -rw-r--r-- | src/include/access/heapam.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h index c716ab23926..d110759cb62 100644 --- a/src/include/access/heapam.h +++ b/src/include/access/heapam.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: heapam.h,v 1.55 2000/07/02 22:01:00 momjian Exp $ + * $Id: heapam.h,v 1.56 2000/08/03 19:19:38 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -216,6 +216,8 @@ extern HeapAccessStatistics heap_access_stats; /* in stats.c */ extern Relation heap_open(Oid relationId, LOCKMODE lockmode); extern Relation heap_openr(const char *relationName, LOCKMODE lockmode); +extern Relation heap_open_nofail(Oid relationId); +extern Relation heap_openr_nofail(const char *relationName); extern void heap_close(Relation relation, LOCKMODE lockmode); extern HeapScanDesc heap_beginscan(Relation relation, int atend, Snapshot snapshot, unsigned nkeys, ScanKey key); |
