mirror of
https://github.com/postgres/postgres.git
synced 2025-08-30 06:01:21 +03:00
This patch...
1. Removes the unnecessary "#define AbcRegProcedure 123"'s from pg_proc.h. 2. Changes those #defines to use the names already defined in fmgr.h. 3. Forces the make of fmgr.h in backend/Makefile instead of having it made as a dependency in access/common/Makefile *hack*hack*hack* 4. Rearranged the #includes to a less helter-skelter arrangement, also changing <file.h> to "file.h" to signify a non-system header. 5. Removed "pg_proc.h" from files where its only purpose was for the #defines removed in item #1. 6. Added "fmgr.h" to each file changed for completeness sake. Turns out that #6 was not necessary for some files because fmgr.h was being included in a roundabout way SIX levels deep by the first include. "access/genam.h" ->"access/relscan.h" ->"utils/rel.h" ->"access/strat.h" ->"access/skey.h" ->"fmgr.h" So adding fmgr.h really didn't add anything to the compile, hopefully just made it clearer to the programmer. S Darren.
This commit is contained in:
@@ -8,23 +8,22 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.18 1998/04/06 17:27:06 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.19 1998/04/27 04:04:09 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include <postgres.h>
|
||||
#include "postgres.h"
|
||||
|
||||
#include <catalog/pg_proc.h>
|
||||
#include <catalog/pg_operator.h>
|
||||
#include <catalog/catname.h>
|
||||
#include <catalog/pg_index.h>
|
||||
#include <catalog/pg_amop.h>
|
||||
#include <catalog/pg_amproc.h>
|
||||
#include <utils/memutils.h> /* could have been access/itup.h */
|
||||
#include <access/heapam.h>
|
||||
#include <access/istrat.h>
|
||||
#include <fmgr.h>
|
||||
#include "access/heapam.h"
|
||||
#include "access/istrat.h"
|
||||
#include "catalog/catname.h"
|
||||
#include "catalog/pg_amop.h"
|
||||
#include "catalog/pg_amproc.h"
|
||||
#include "catalog/pg_index.h"
|
||||
#include "catalog/pg_operator.h"
|
||||
#include "fmgr.h"
|
||||
#include "utils/memutils.h" /* could have been access/itup.h */
|
||||
|
||||
#ifdef USE_ASSERT_CHECKING
|
||||
static bool StrategyEvaluationIsValid(StrategyEvaluation evaluation);
|
||||
@@ -505,7 +504,7 @@ OperatorRelationFillScanKeyEntry(Relation operatorRelation,
|
||||
|
||||
ScanKeyEntryInitialize(&scanKeyData, 0,
|
||||
ObjectIdAttributeNumber,
|
||||
ObjectIdEqualRegProcedure,
|
||||
F_OIDEQ,
|
||||
ObjectIdGetDatum(operatorObjectId));
|
||||
|
||||
scan = heap_beginscan(operatorRelation, false, false,
|
||||
@@ -561,7 +560,7 @@ IndexSupportInitialize(IndexStrategy indexStrategy,
|
||||
maxStrategyNumber = AMStrategies(maxStrategyNumber);
|
||||
|
||||
ScanKeyEntryInitialize(&entry[0], 0, Anum_pg_index_indexrelid,
|
||||
ObjectIdEqualRegProcedure,
|
||||
F_OIDEQ,
|
||||
ObjectIdGetDatum(indexObjectId));
|
||||
|
||||
relation = heap_openr(IndexRelationName);
|
||||
@@ -601,11 +600,11 @@ IndexSupportInitialize(IndexStrategy indexStrategy,
|
||||
{
|
||||
|
||||
ScanKeyEntryInitialize(&entry[0], 0, Anum_pg_amproc_amid,
|
||||
ObjectIdEqualRegProcedure,
|
||||
F_OIDEQ,
|
||||
ObjectIdGetDatum(accessMethodObjectId));
|
||||
|
||||
ScanKeyEntryInitialize(&entry[1], 0, Anum_pg_amproc_amopclaid,
|
||||
ObjectIdEqualRegProcedure, 0);
|
||||
F_OIDEQ, 0);
|
||||
|
||||
/* relation = heap_openr(Name_pg_amproc); */
|
||||
relation = heap_openr(AccessMethodProcedureRelationName);
|
||||
@@ -646,12 +645,12 @@ IndexSupportInitialize(IndexStrategy indexStrategy,
|
||||
|
||||
ScanKeyEntryInitialize(&entry[0], 0,
|
||||
Anum_pg_amop_amopid,
|
||||
ObjectIdEqualRegProcedure,
|
||||
F_OIDEQ,
|
||||
ObjectIdGetDatum(accessMethodObjectId));
|
||||
|
||||
ScanKeyEntryInitialize(&entry[1], 0,
|
||||
Anum_pg_amop_amopclaid,
|
||||
ObjectIdEqualRegProcedure, 0);
|
||||
F_OIDEQ, 0);
|
||||
|
||||
relation = heap_openr(AccessMethodOperatorRelationName);
|
||||
operatorRelation = heap_openr(OperatorRelationName);
|
||||
|
@@ -7,21 +7,20 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.18 1998/01/15 19:42:15 pgsql Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.19 1998/04/27 04:04:21 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include <postgres.h>
|
||||
#include "postgres.h"
|
||||
|
||||
#include <access/genam.h>
|
||||
#include <fmgr.h>
|
||||
#include <storage/bufpage.h>
|
||||
#include <access/nbtree.h>
|
||||
#include <access/istrat.h>
|
||||
#include <access/iqual.h>
|
||||
#include <catalog/pg_proc.h>
|
||||
#include <executor/execdebug.h>
|
||||
#include "access/genam.h"
|
||||
#include "access/iqual.h"
|
||||
#include "access/istrat.h"
|
||||
#include "access/nbtree.h"
|
||||
#include "executor/execdebug.h"
|
||||
#include "fmgr.h"
|
||||
#include "storage/bufpage.h"
|
||||
|
||||
extern int NIndexTupleProcessed;
|
||||
|
||||
@@ -54,7 +53,7 @@ _bt_mkscankey(Relation rel, IndexTuple itup)
|
||||
arg = index_getattr(itup, i + 1, itupdesc, &null);
|
||||
if (null)
|
||||
{
|
||||
proc = NullValueRegProcedure;
|
||||
proc = F_NULLVALUE;
|
||||
flag = SK_ISNULL;
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user