File tree Expand file tree Collapse file tree 3 files changed +18
-10
lines changed
Expand file tree Collapse file tree 3 files changed +18
-10
lines changed Original file line number Diff line number Diff line change 88 *
99 *
1010 * IDENTIFICATION
11- * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.81 2000/06/09 01:44:14 momjian Exp $
11+ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.82 2000/06/09 03:17:13 tgl Exp $
1212 *
1313 *-------------------------------------------------------------------------
1414 */
2323#include "optimizer/clauses.h"
2424#include "optimizer/internal.h"
2525#include "optimizer/paths.h"
26+ #include "optimizer/plancat.h"
2627#include "optimizer/planmain.h"
2728#include "optimizer/planner.h"
2829#include "optimizer/prep.h"
Original file line number Diff line number Diff line change 1010 *
1111 * IDENTIFICATION
1212<<<<<<< plancat.c
13- * $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.54 2000/06/09 01:44:16 momjian Exp $
13+ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.55 2000/06/09 03:17:12 tgl Exp $
1414=======
15- * $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.54 2000/06/09 01:44:16 momjian Exp $
15+ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.55 2000/06/09 03:17:12 tgl Exp $
1616>>>>>>> 1.53
1717 *
1818 *-------------------------------------------------------------------------
@@ -292,13 +292,18 @@ find_inheritance_children(Oid inhparent)
292292 * Currently has_subclass is only used as an efficiency hack, so this
293293 * is ok.
294294 */
295- bool has_subclass (Oid relationId )
295+ bool
296+ has_subclass (Oid relationId )
296297{
297- HeapTuple tuple =
298- SearchSysCacheTuple (RELOID ,
299- ObjectIdGetDatum (relationId ),
300- 0 , 0 , 0 );
301- return ((Form_pg_class ) GETSTRUCT (tuple ))-> relhassubclass ;
298+ HeapTuple tuple =
299+ SearchSysCacheTuple (RELOID ,
300+ ObjectIdGetDatum (relationId ),
301+ 0 , 0 , 0 );
302+
303+ if (!HeapTupleIsValid (tuple ))
304+ elog (ERROR , "has_subclass: Relation %u not found" ,
305+ relationId );
306+ return ((Form_pg_class ) GETSTRUCT (tuple ))-> relhassubclass ;
302307}
303308
304309#ifdef NOT_USED
Original file line number Diff line number Diff line change 77 * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
88 * Portions Copyright (c) 1994, Regents of the University of California
99 *
10- * $Id: plancat.h,v 1.18 2000/04/12 17:16:42 momjian Exp $
10+ * $Id: plancat.h,v 1.19 2000/06/09 03: 17:11 tgl Exp $
1111 *
1212 *-------------------------------------------------------------------------
1313 */
@@ -24,6 +24,8 @@ extern List *find_secondary_indexes(Query *root, Index relid);
2424
2525extern List * find_inheritance_children (Oid inhparent );
2626
27+ extern bool has_subclass (Oid relationId );
28+
2729extern Selectivity restriction_selectivity (Oid functionObjectId ,
2830 Oid operatorObjectId ,
2931 Oid relationObjectId ,
You can’t perform that action at this time.
0 commit comments