mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
Inheritance overhaul by Chris Bitmead <chris@bitmead.com>
This commit is contained in:
@@ -9,7 +9,11 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.53 2000/05/30 04:24:48 tgl Exp $
|
||||
<<<<<<< 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.54 2000/06/09 01:44:16 momjian Exp $
|
||||
>>>>>>> 1.53
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -278,6 +282,25 @@ find_inheritance_children(Oid inhparent)
|
||||
return list;
|
||||
}
|
||||
|
||||
/*
|
||||
* has_subclass -
|
||||
* In the current implementation, has_subclass returns whether a
|
||||
* particular class *might* have a subclass. It will not return the
|
||||
* correct result if a class had a subclass which was later dropped.
|
||||
* This is because relhassubclass in pg_class is not updated,
|
||||
* possibly because of efficiency and/or concurrency concerns.
|
||||
* Currently has_subclass is only used as an efficiency hack, so this
|
||||
* is ok.
|
||||
*/
|
||||
bool has_subclass(Oid relationId)
|
||||
{
|
||||
HeapTuple tuple =
|
||||
SearchSysCacheTuple(RELOID,
|
||||
ObjectIdGetDatum(relationId),
|
||||
0, 0, 0);
|
||||
return ((Form_pg_class) GETSTRUCT(tuple))->relhassubclass;
|
||||
}
|
||||
|
||||
#ifdef NOT_USED
|
||||
/*
|
||||
* VersionGetParents
|
||||
|
||||
Reference in New Issue
Block a user