Commit ce774620 authored by Tom Lane's avatar Tom Lane

Cause inheritance patch to meet minimum coding standards (no gcc

warnings).
parent 7fca3f03
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.81 2000/06/09 01:44:14 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.82 2000/06/09 03:17:13 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include "optimizer/clauses.h" #include "optimizer/clauses.h"
#include "optimizer/internal.h" #include "optimizer/internal.h"
#include "optimizer/paths.h" #include "optimizer/paths.h"
#include "optimizer/plancat.h"
#include "optimizer/planmain.h" #include "optimizer/planmain.h"
#include "optimizer/planner.h" #include "optimizer/planner.h"
#include "optimizer/prep.h" #include "optimizer/prep.h"
......
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
* *
* IDENTIFICATION * IDENTIFICATION
<<<<<<< plancat.c <<<<<<< plancat.c
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.54 2000/06/09 01:44:16 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.55 2000/06/09 03:17:12 tgl Exp $
======= =======
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.54 2000/06/09 01:44:16 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.55 2000/06/09 03:17:12 tgl Exp $
>>>>>>> 1.53 >>>>>>> 1.53
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
...@@ -292,13 +292,18 @@ find_inheritance_children(Oid inhparent) ...@@ -292,13 +292,18 @@ find_inheritance_children(Oid inhparent)
* Currently has_subclass is only used as an efficiency hack, so this * Currently has_subclass is only used as an efficiency hack, so this
* is ok. * is ok.
*/ */
bool has_subclass(Oid relationId) bool
has_subclass(Oid relationId)
{ {
HeapTuple tuple = HeapTuple tuple =
SearchSysCacheTuple(RELOID, SearchSysCacheTuple(RELOID,
ObjectIdGetDatum(relationId), ObjectIdGetDatum(relationId),
0, 0, 0); 0, 0, 0);
return ((Form_pg_class) GETSTRUCT(tuple))->relhassubclass;
if (!HeapTupleIsValid(tuple))
elog(ERROR, "has_subclass: Relation %u not found",
relationId);
return ((Form_pg_class) GETSTRUCT(tuple))->relhassubclass;
} }
#ifdef NOT_USED #ifdef NOT_USED
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: plancat.h,v 1.18 2000/04/12 17:16:42 momjian Exp $ * $Id: plancat.h,v 1.19 2000/06/09 03:17:11 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -24,6 +24,8 @@ extern List *find_secondary_indexes(Query *root, Index relid); ...@@ -24,6 +24,8 @@ extern List *find_secondary_indexes(Query *root, Index relid);
extern List *find_inheritance_children(Oid inhparent); extern List *find_inheritance_children(Oid inhparent);
extern bool has_subclass(Oid relationId);
extern Selectivity restriction_selectivity(Oid functionObjectId, extern Selectivity restriction_selectivity(Oid functionObjectId,
Oid operatorObjectId, Oid operatorObjectId,
Oid relationObjectId, Oid relationObjectId,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment