mirror of
https://github.com/postgres/postgres.git
synced 2025-11-13 16:22:44 +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:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.8 1998/02/26 04:30:26 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.9 1998/04/27 04:04:36 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* See acl.h.
|
||||
@@ -21,23 +21,22 @@
|
||||
#include "access/heapam.h"
|
||||
#include "access/htup.h"
|
||||
#include "access/tupmacs.h"
|
||||
#include "utils/builtins.h"
|
||||
#include "utils/memutils.h"
|
||||
#include "utils/palloc.h"
|
||||
#include "catalog/indexing.h"
|
||||
#include "catalog/catalog.h"
|
||||
#include "catalog/catname.h"
|
||||
#include "catalog/pg_aggregate.h"
|
||||
#include "catalog/pg_group.h"
|
||||
#include "catalog/pg_operator.h"
|
||||
#include "catalog/pg_aggregate.h"
|
||||
#include "catalog/pg_proc.h"
|
||||
#include "catalog/pg_type.h"
|
||||
#include "catalog/pg_shadow.h"
|
||||
#include "catalog/pg_type.h"
|
||||
#include "fmgr.h"
|
||||
#include "parser/parse_agg.h"
|
||||
#include "parser/parse_func.h"
|
||||
#include "utils/builtins.h"
|
||||
#include "utils/memutils.h"
|
||||
#include "utils/syscache.h"
|
||||
#include "utils/tqual.h"
|
||||
#include "fmgr.h"
|
||||
|
||||
static int32 aclcheck(char *relname, Acl *acl, AclId id, AclIdType idtype, AclMode mode);
|
||||
|
||||
@@ -99,7 +98,7 @@ ChangeAcl(char *relname,
|
||||
*new_acl;
|
||||
Relation relation;
|
||||
static ScanKeyData relkey[1] = {
|
||||
{0, Anum_pg_class_relname, NameEqualRegProcedure}
|
||||
{0, Anum_pg_class_relname, F_NAMEEQ}
|
||||
};
|
||||
HeapScanDesc hsdp;
|
||||
HeapTuple htp;
|
||||
@@ -122,7 +121,7 @@ ChangeAcl(char *relname,
|
||||
if (!RelationIsValid(relation))
|
||||
elog(ERROR, "ChangeAcl: could not open '%s'??",
|
||||
RelationRelationName);
|
||||
fmgr_info(NameEqualRegProcedure, &relkey[0].sk_func);
|
||||
fmgr_info(F_NAMEEQ, &relkey[0].sk_func);
|
||||
relkey[0].sk_nargs = relkey[0].sk_func.fn_nargs;
|
||||
relkey[0].sk_argument = NameGetDatum(relname);
|
||||
hsdp = heap_beginscan(relation,
|
||||
@@ -480,7 +479,7 @@ pg_aclcheck(char *relname, char *usename, AclMode mode)
|
||||
#else
|
||||
{ /* This is why the syscache is great... */
|
||||
static ScanKeyData relkey[1] = {
|
||||
{0, Anum_pg_class_relname, NameEqualRegProcedure}
|
||||
{0, Anum_pg_class_relname, F_NAMEEQ}
|
||||
};
|
||||
HeapScanDesc hsdp;
|
||||
|
||||
@@ -491,7 +490,7 @@ pg_aclcheck(char *relname, char *usename, AclMode mode)
|
||||
RelationRelationName);
|
||||
return ACLCHECK_NO_CLASS;
|
||||
}
|
||||
fmgr_info(NameEqualRegProcedure,
|
||||
fmgr_info(F_NAMEEQ,
|
||||
&relkey[0].sk_func,
|
||||
&relkey[0].sk_nargs);
|
||||
relkey[0].sk_argument = NameGetDatum(relname);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.47 1998/02/26 04:30:35 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.48 1998/04/27 04:04:47 momjian Exp $
|
||||
*
|
||||
* INTERFACE ROUTINES
|
||||
* heap_create() - Create an uncataloged heap relation
|
||||
@@ -25,38 +25,38 @@
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#include <postgres.h>
|
||||
#include "postgres.h"
|
||||
|
||||
#include "access/heapam.h"
|
||||
#include "catalog/catalog.h"
|
||||
#include "catalog/catname.h"
|
||||
#include "catalog/heap.h"
|
||||
#include "catalog/index.h"
|
||||
#include "catalog/indexing.h"
|
||||
#include "catalog/pg_attrdef.h"
|
||||
#include "catalog/pg_index.h"
|
||||
#include "catalog/pg_inherits.h"
|
||||
#include "catalog/pg_ipl.h"
|
||||
#include "catalog/pg_relcheck.h"
|
||||
#include "catalog/pg_type.h"
|
||||
#include "commands/trigger.h"
|
||||
#include "fmgr.h"
|
||||
#include "miscadmin.h"
|
||||
#include "nodes/plannodes.h"
|
||||
#include "optimizer/tlist.h"
|
||||
#include "parser/parse_expr.h"
|
||||
#include "parser/parse_node.h"
|
||||
#include "parser/parse_type.h"
|
||||
#include "rewrite/rewriteRemove.h"
|
||||
#include "storage/bufmgr.h"
|
||||
#include "storage/lmgr.h"
|
||||
#include "storage/smgr.h"
|
||||
#include "tcop/tcopprot.h"
|
||||
#include "utils/builtins.h"
|
||||
#include "utils/mcxt.h"
|
||||
#include "utils/relcache.h"
|
||||
#include "utils/tqual.h"
|
||||
|
||||
#include <miscadmin.h>
|
||||
#include <fmgr.h>
|
||||
#include <access/heapam.h>
|
||||
#include <catalog/catalog.h>
|
||||
#include <catalog/catname.h>
|
||||
#include <catalog/heap.h>
|
||||
#include <catalog/index.h>
|
||||
#include <catalog/indexing.h>
|
||||
#include <catalog/pg_attrdef.h>
|
||||
#include <catalog/pg_index.h>
|
||||
#include <catalog/pg_inherits.h>
|
||||
#include <catalog/pg_ipl.h>
|
||||
#include <catalog/pg_proc.h>
|
||||
#include <catalog/pg_relcheck.h>
|
||||
#include <catalog/pg_type.h>
|
||||
#include <commands/trigger.h>
|
||||
#include <nodes/plannodes.h>
|
||||
#include <optimizer/tlist.h>
|
||||
#include <parser/parse_expr.h>
|
||||
#include <parser/parse_node.h>
|
||||
#include <parser/parse_type.h>
|
||||
#include <rewrite/rewriteRemove.h>
|
||||
#include <storage/bufmgr.h>
|
||||
#include <storage/lmgr.h>
|
||||
#include <storage/smgr.h>
|
||||
#include <tcop/tcopprot.h>
|
||||
#include <utils/builtins.h>
|
||||
#include <utils/mcxt.h>
|
||||
#include <utils/relcache.h>
|
||||
#include <utils/tqual.h>
|
||||
#ifndef HAVE_MEMMOVE
|
||||
#include <regex/utils.h>
|
||||
#else
|
||||
@@ -494,7 +494,7 @@ RelationAlreadyExists(Relation pg_class_desc, char relname[])
|
||||
ScanKeyEntryInitialize(&key,
|
||||
0,
|
||||
(AttrNumber) Anum_pg_class_relname,
|
||||
(RegProcedure) NameEqualRegProcedure,
|
||||
(RegProcedure) F_NAMEEQ,
|
||||
(Datum) relname);
|
||||
|
||||
/* ----------------
|
||||
@@ -892,7 +892,7 @@ RelationRemoveInheritance(Relation relation)
|
||||
* ----------------
|
||||
*/
|
||||
ScanKeyEntryInitialize(&entry, 0x0, Anum_pg_inherits_inhparent,
|
||||
ObjectIdEqualRegProcedure,
|
||||
F_OIDEQ,
|
||||
ObjectIdGetDatum(RelationGetRelationId(relation)));
|
||||
|
||||
scan = heap_beginscan(catalogRelation,
|
||||
@@ -987,7 +987,7 @@ RelationRemoveIndexes(Relation relation)
|
||||
indexRelation = heap_openr(IndexRelationName);
|
||||
|
||||
ScanKeyEntryInitialize(&entry, 0x0, Anum_pg_index_indrelid,
|
||||
ObjectIdEqualRegProcedure,
|
||||
F_OIDEQ,
|
||||
ObjectIdGetDatum(RelationGetRelationId(relation)));
|
||||
|
||||
scan = heap_beginscan(indexRelation,
|
||||
@@ -1654,7 +1654,7 @@ RemoveAttrDefault(Relation rel)
|
||||
adrel = heap_openr(AttrDefaultRelationName);
|
||||
|
||||
ScanKeyEntryInitialize(&key, 0, Anum_pg_attrdef_adrelid,
|
||||
ObjectIdEqualRegProcedure, rel->rd_id);
|
||||
F_OIDEQ, rel->rd_id);
|
||||
|
||||
RelationSetLockForWrite(adrel);
|
||||
|
||||
@@ -1681,7 +1681,7 @@ RemoveRelCheck(Relation rel)
|
||||
rcrel = heap_openr(RelCheckRelationName);
|
||||
|
||||
ScanKeyEntryInitialize(&key, 0, Anum_pg_relcheck_rcrelid,
|
||||
ObjectIdEqualRegProcedure, rel->rd_id);
|
||||
F_OIDEQ, rel->rd_id);
|
||||
|
||||
RelationSetLockForWrite(rcrel);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.39 1998/02/26 04:30:38 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.40 1998/04/27 04:04:55 momjian Exp $
|
||||
*
|
||||
*
|
||||
* INTERFACE ROUTINES
|
||||
@@ -24,7 +24,6 @@
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#include "postgres.h"
|
||||
#include "fmgr.h"
|
||||
|
||||
#include "access/genam.h"
|
||||
#include "access/heapam.h"
|
||||
@@ -39,6 +38,7 @@
|
||||
#include "catalog/pg_proc.h"
|
||||
#include "catalog/pg_type.h"
|
||||
#include "executor/executor.h"
|
||||
#include "fmgr.h"
|
||||
#include "miscadmin.h"
|
||||
#include "optimizer/clauses.h"
|
||||
#include "optimizer/prep.h"
|
||||
@@ -177,7 +177,7 @@ RelationNameGetObjectId(char *relationName,
|
||||
* ----------------
|
||||
*/
|
||||
ScanKeyEntryInitialize(&key, 0, Anum_pg_class_relname,
|
||||
NameEqualRegProcedure,
|
||||
F_NAMEEQ,
|
||||
PointerGetDatum(relationName));
|
||||
|
||||
pg_class_scan = heap_beginscan(pg_class, 0, false, 1, &key);
|
||||
@@ -502,7 +502,7 @@ AccessMethodObjectIdGetAccessMethodTupleForm(Oid accessMethodObjectId)
|
||||
* ----------------
|
||||
*/
|
||||
ScanKeyEntryInitialize(&key, 0, ObjectIdAttributeNumber,
|
||||
ObjectIdEqualRegProcedure,
|
||||
F_OIDEQ,
|
||||
ObjectIdGetDatum(accessMethodObjectId));
|
||||
|
||||
/* ----------------
|
||||
@@ -950,7 +950,7 @@ UpdateIndexPredicate(Oid indexoid, Node *oldPred, Node *predicate)
|
||||
pg_index = heap_openr(IndexRelationName);
|
||||
|
||||
ScanKeyEntryInitialize(&entry, 0x0, Anum_pg_index_indexrelid,
|
||||
ObjectIdEqualRegProcedure,
|
||||
F_OIDEQ,
|
||||
ObjectIdGetDatum(indexoid));
|
||||
|
||||
scan = heap_beginscan(pg_index, 0, false, 1, &entry);
|
||||
@@ -1246,7 +1246,7 @@ index_destroy(Oid indexId)
|
||||
catalogRelation = heap_openr(RelationRelationName);
|
||||
|
||||
ScanKeyEntryInitialize(&entry, 0x0, ObjectIdAttributeNumber,
|
||||
ObjectIdEqualRegProcedure,
|
||||
F_OIDEQ,
|
||||
ObjectIdGetDatum(indexId));;
|
||||
|
||||
scan = heap_beginscan(catalogRelation, 0, false, 1, &entry);
|
||||
@@ -1371,13 +1371,13 @@ UpdateStats(Oid relid, long reltuples, bool hasindex)
|
||||
Relation idescs[Num_pg_class_indices];
|
||||
|
||||
static ScanKeyData key[1] = {
|
||||
{0, ObjectIdAttributeNumber, ObjectIdEqualRegProcedure}
|
||||
{0, ObjectIdAttributeNumber, F_OIDEQ}
|
||||
};
|
||||
Datum values[Natts_pg_class];
|
||||
char nulls[Natts_pg_class];
|
||||
char replace[Natts_pg_class];
|
||||
|
||||
fmgr_info(ObjectIdEqualRegProcedure, &key[0].sk_func);
|
||||
fmgr_info(F_OIDEQ, &key[0].sk_func);
|
||||
key[0].sk_nargs = key[0].sk_func.fn_nargs;
|
||||
|
||||
/* ----------------
|
||||
@@ -1822,7 +1822,7 @@ IndexIsUniqueNoCache(Oid indexId)
|
||||
|
||||
ScanKeyEntryInitialize(&skey[0], (bits16) 0x0,
|
||||
Anum_pg_index_indexrelid,
|
||||
(RegProcedure) ObjectIdEqualRegProcedure,
|
||||
(RegProcedure) F_OIDEQ,
|
||||
ObjectIdGetDatum(indexId));
|
||||
|
||||
scandesc = heap_beginscan(pg_index, 0, true, 1, skey);
|
||||
|
||||
@@ -8,28 +8,29 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.16 1997/11/20 23:20:47 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.17 1998/04/27 04:04:58 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#include <string.h>
|
||||
|
||||
#include <postgres.h>
|
||||
#include "postgres.h"
|
||||
|
||||
#include <utils/builtins.h>
|
||||
#include <utils/oidcompos.h>
|
||||
#include <access/heapam.h>
|
||||
#include <access/genam.h>
|
||||
#include <storage/bufmgr.h>
|
||||
#include <nodes/execnodes.h>
|
||||
#include <catalog/catalog.h>
|
||||
#include <catalog/catname.h>
|
||||
#include <catalog/pg_index.h>
|
||||
#include <catalog/pg_proc.h>
|
||||
#include <utils/syscache.h>
|
||||
#include <catalog/indexing.h>
|
||||
#include <catalog/index.h>
|
||||
#include <miscadmin.h>
|
||||
#include "access/genam.h"
|
||||
#include "access/heapam.h"
|
||||
#include "catalog/catalog.h"
|
||||
#include "catalog/catname.h"
|
||||
#include "catalog/index.h"
|
||||
#include "catalog/indexing.h"
|
||||
#include "catalog/pg_index.h"
|
||||
#include "catalog/pg_proc.h"
|
||||
#include "fmgr.h"
|
||||
#include "miscadmin.h"
|
||||
#include "nodes/execnodes.h"
|
||||
#include "storage/bufmgr.h"
|
||||
#include "utils/builtins.h"
|
||||
#include "utils/oidcompos.h"
|
||||
#include "utils/syscache.h"
|
||||
|
||||
/*
|
||||
* Names of indices on the following system catalogs:
|
||||
@@ -280,7 +281,7 @@ AttributeNameIndexScan(Relation heapRelation,
|
||||
ScanKeyEntryInitialize(&skey,
|
||||
(bits16) 0x0,
|
||||
(AttrNumber) 1,
|
||||
(RegProcedure) OidNameEqRegProcedure,
|
||||
(RegProcedure) F_OIDNAMEEQ,
|
||||
(Datum) keyarg);
|
||||
|
||||
idesc = index_openr(AttributeNameIndex);
|
||||
@@ -306,7 +307,7 @@ AttributeNumIndexScan(Relation heapRelation,
|
||||
ScanKeyEntryInitialize(&skey,
|
||||
(bits16) 0x0,
|
||||
(AttrNumber) 1,
|
||||
(RegProcedure) OidInt2EqRegProcedure,
|
||||
(RegProcedure) F_OIDINT2EQ,
|
||||
(Datum) keyarg);
|
||||
|
||||
idesc = index_openr(AttributeNumIndex);
|
||||
@@ -328,7 +329,7 @@ ProcedureOidIndexScan(Relation heapRelation, Oid procId)
|
||||
ScanKeyEntryInitialize(&skey,
|
||||
(bits16) 0x0,
|
||||
(AttrNumber) 1,
|
||||
(RegProcedure) ObjectIdEqualRegProcedure,
|
||||
(RegProcedure) F_OIDEQ,
|
||||
(Datum) procId);
|
||||
|
||||
idesc = index_openr(ProcedureOidIndex);
|
||||
@@ -371,7 +372,7 @@ ProcedureNameIndexScan(Relation heapRelation,
|
||||
ScanKeyEntryInitialize(&skey,
|
||||
(bits16) 0x0,
|
||||
(AttrNumber) 1,
|
||||
(RegProcedure) NameEqualRegProcedure,
|
||||
(RegProcedure) F_NAMEEQ,
|
||||
(Datum) procName);
|
||||
|
||||
idesc = index_openr(ProcedureNameIndex);
|
||||
@@ -447,7 +448,7 @@ ProcedureSrcIndexScan(Relation heapRelation, text *procSrc)
|
||||
ScanKeyEntryInitialize(&skey,
|
||||
(bits16) 0x0,
|
||||
(AttrNumber) Anum_pg_proc_prosrc,
|
||||
(RegProcedure) TextEqualRegProcedure,
|
||||
(RegProcedure) F_TEXTEQ,
|
||||
(Datum) procSrc);
|
||||
|
||||
idesc = index_openr(ProcedureSrcIndex);
|
||||
@@ -486,7 +487,7 @@ TypeOidIndexScan(Relation heapRelation, Oid typeId)
|
||||
ScanKeyEntryInitialize(&skey,
|
||||
(bits16) 0x0,
|
||||
(AttrNumber) 1,
|
||||
(RegProcedure) ObjectIdEqualRegProcedure,
|
||||
(RegProcedure) F_OIDEQ,
|
||||
(Datum) typeId);
|
||||
|
||||
idesc = index_openr(TypeOidIndex);
|
||||
@@ -507,7 +508,7 @@ TypeNameIndexScan(Relation heapRelation, char *typeName)
|
||||
ScanKeyEntryInitialize(&skey,
|
||||
(bits16) 0x0,
|
||||
(AttrNumber) 1,
|
||||
(RegProcedure) NameEqualRegProcedure,
|
||||
(RegProcedure) F_NAMEEQ,
|
||||
(Datum) typeName);
|
||||
|
||||
idesc = index_openr(TypeNameIndex);
|
||||
@@ -528,7 +529,7 @@ ClassNameIndexScan(Relation heapRelation, char *relName)
|
||||
ScanKeyEntryInitialize(&skey,
|
||||
(bits16) 0x0,
|
||||
(AttrNumber) 1,
|
||||
(RegProcedure) NameEqualRegProcedure,
|
||||
(RegProcedure) F_NAMEEQ,
|
||||
(Datum) relName);
|
||||
|
||||
idesc = index_openr(ClassNameIndex);
|
||||
@@ -549,7 +550,7 @@ ClassOidIndexScan(Relation heapRelation, Oid relId)
|
||||
ScanKeyEntryInitialize(&skey,
|
||||
(bits16) 0x0,
|
||||
(AttrNumber) 1,
|
||||
(RegProcedure) ObjectIdEqualRegProcedure,
|
||||
(RegProcedure) F_OIDEQ,
|
||||
(Datum) relId);
|
||||
|
||||
idesc = index_openr(ClassOidIndex);
|
||||
|
||||
@@ -7,27 +7,28 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.23 1998/04/01 15:35:04 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.24 1998/04/27 04:05:00 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* these routines moved here from commands/define.c and somewhat cleaned up.
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#include <postgres.h>
|
||||
#include "postgres.h"
|
||||
|
||||
#include "access/heapam.h"
|
||||
#include "catalog/catname.h"
|
||||
#include "catalog/pg_operator.h"
|
||||
#include "catalog/pg_proc.h"
|
||||
#include "catalog/pg_type.h"
|
||||
#include "fmgr.h"
|
||||
#include "miscadmin.h"
|
||||
#include "parser/parse_oper.h"
|
||||
#include "storage/bufmgr.h"
|
||||
#include "utils/builtins.h"
|
||||
#include "utils/syscache.h"
|
||||
#include "utils/tqual.h"
|
||||
|
||||
#include <catalog/pg_proc.h>
|
||||
#include <utils/syscache.h>
|
||||
#include <utils/tqual.h>
|
||||
#include <utils/builtins.h>
|
||||
#include <access/heapam.h>
|
||||
#include <catalog/catname.h>
|
||||
#include <catalog/pg_operator.h>
|
||||
#include <catalog/pg_type.h>
|
||||
#include <parser/parse_oper.h>
|
||||
#include <storage/bufmgr.h>
|
||||
#include <fmgr.h>
|
||||
#include <miscadmin.h>
|
||||
#ifndef HAVE_MEMMOVE
|
||||
#include <regex/utils.h>
|
||||
#else
|
||||
@@ -93,14 +94,14 @@ OperatorGetWithOpenRelation(Relation pg_operator_desc,
|
||||
HeapTuple tup;
|
||||
|
||||
static ScanKeyData opKey[3] = {
|
||||
{0, Anum_pg_operator_oprname, NameEqualRegProcedure},
|
||||
{0, Anum_pg_operator_oprleft, ObjectIdEqualRegProcedure},
|
||||
{0, Anum_pg_operator_oprright, ObjectIdEqualRegProcedure},
|
||||
{0, Anum_pg_operator_oprname, F_NAMEEQ},
|
||||
{0, Anum_pg_operator_oprleft, F_OIDEQ},
|
||||
{0, Anum_pg_operator_oprright, F_OIDEQ},
|
||||
};
|
||||
|
||||
fmgr_info(NameEqualRegProcedure, &opKey[0].sk_func);
|
||||
fmgr_info(ObjectIdEqualRegProcedure, &opKey[1].sk_func);
|
||||
fmgr_info(ObjectIdEqualRegProcedure, &opKey[2].sk_func);
|
||||
fmgr_info(F_NAMEEQ, &opKey[0].sk_func);
|
||||
fmgr_info(F_OIDEQ, &opKey[1].sk_func);
|
||||
fmgr_info(F_OIDEQ, &opKey[2].sk_func);
|
||||
opKey[0].sk_nargs = opKey[0].sk_func.fn_nargs;
|
||||
opKey[1].sk_nargs = opKey[1].sk_func.fn_nargs;
|
||||
opKey[2].sk_nargs = opKey[2].sk_func.fn_nargs;
|
||||
@@ -481,14 +482,14 @@ OperatorDef(char *operatorName,
|
||||
TupleDesc tupDesc;
|
||||
|
||||
static ScanKeyData opKey[3] = {
|
||||
{0, Anum_pg_operator_oprname, NameEqualRegProcedure},
|
||||
{0, Anum_pg_operator_oprleft, ObjectIdEqualRegProcedure},
|
||||
{0, Anum_pg_operator_oprright, ObjectIdEqualRegProcedure},
|
||||
{0, Anum_pg_operator_oprname, F_NAMEEQ},
|
||||
{0, Anum_pg_operator_oprleft, F_OIDEQ},
|
||||
{0, Anum_pg_operator_oprright, F_OIDEQ},
|
||||
};
|
||||
|
||||
fmgr_info(NameEqualRegProcedure, &opKey[0].sk_func);
|
||||
fmgr_info(ObjectIdEqualRegProcedure, &opKey[1].sk_func);
|
||||
fmgr_info(ObjectIdEqualRegProcedure, &opKey[2].sk_func);
|
||||
fmgr_info(F_NAMEEQ, &opKey[0].sk_func);
|
||||
fmgr_info(F_OIDEQ, &opKey[1].sk_func);
|
||||
fmgr_info(F_OIDEQ, &opKey[2].sk_func);
|
||||
opKey[0].sk_nargs = opKey[0].sk_func.fn_nargs;
|
||||
opKey[1].sk_nargs = opKey[1].sk_func.fn_nargs;
|
||||
opKey[2].sk_nargs = opKey[2].sk_func.fn_nargs;
|
||||
@@ -783,10 +784,10 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
|
||||
Datum values[Natts_pg_operator];
|
||||
|
||||
static ScanKeyData opKey[1] = {
|
||||
{0, ObjectIdAttributeNumber, ObjectIdEqualRegProcedure},
|
||||
{0, ObjectIdAttributeNumber, F_OIDEQ},
|
||||
};
|
||||
|
||||
fmgr_info(ObjectIdEqualRegProcedure, &opKey[0].sk_func);
|
||||
fmgr_info(F_OIDEQ, &opKey[0].sk_func);
|
||||
opKey[0].sk_nargs = opKey[0].sk_func.fn_nargs;
|
||||
|
||||
for (i = 0; i < Natts_pg_operator; ++i)
|
||||
|
||||
@@ -7,28 +7,29 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.16 1998/04/01 15:35:05 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.17 1998/04/27 04:05:03 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#include <postgres.h>
|
||||
#include "postgres.h"
|
||||
|
||||
#include "access/heapam.h"
|
||||
#include "access/relscan.h"
|
||||
#include "catalog/catname.h"
|
||||
#include "catalog/indexing.h"
|
||||
#include "catalog/pg_proc.h"
|
||||
#include "catalog/pg_type.h"
|
||||
#include "fmgr.h"
|
||||
#include "miscadmin.h"
|
||||
#include "optimizer/internal.h"
|
||||
#include "optimizer/planner.h"
|
||||
#include "parser/parse_node.h"
|
||||
#include "tcop/tcopprot.h"
|
||||
#include "utils/builtins.h"
|
||||
#include "utils/lsyscache.h"
|
||||
#include "utils/sets.h"
|
||||
#include "utils/syscache.h"
|
||||
|
||||
#include <fmgr.h>
|
||||
#include <miscadmin.h>
|
||||
#include <utils/syscache.h>
|
||||
#include <catalog/pg_proc.h>
|
||||
#include <access/heapam.h>
|
||||
#include <access/relscan.h>
|
||||
#include <catalog/catname.h>
|
||||
#include <catalog/indexing.h>
|
||||
#include <catalog/pg_type.h>
|
||||
#include <parser/parse_node.h>
|
||||
#include <tcop/tcopprot.h>
|
||||
#include <utils/builtins.h>
|
||||
#include <utils/sets.h>
|
||||
#include <utils/lsyscache.h>
|
||||
#include <optimizer/internal.h>
|
||||
#include <optimizer/planner.h>
|
||||
#ifndef HAVE_MEMMOVE
|
||||
#include <regex/utils.h>
|
||||
#else
|
||||
@@ -258,8 +259,8 @@ ProcedureCreate(char *procedureName,
|
||||
values[i++] = Int32GetDatum(percall_cpu); /* propercall_cpu */
|
||||
values[i++] = Int32GetDatum(outin_ratio); /* prooutin_ratio */
|
||||
|
||||
values[i++] = (Datum) fmgr(TextInRegProcedure, prosrc); /* prosrc */
|
||||
values[i++] = (Datum) fmgr(TextInRegProcedure, probin); /* probin */
|
||||
values[i++] = (Datum) fmgr(F_TEXTIN, prosrc); /* prosrc */
|
||||
values[i++] = (Datum) fmgr(F_TEXTIN, probin); /* probin */
|
||||
|
||||
rdesc = heap_openr(ProcedureRelationName);
|
||||
|
||||
|
||||
@@ -7,25 +7,25 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.22 1998/04/01 15:35:08 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.23 1998/04/27 04:05:04 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#include <postgres.h>
|
||||
#include "postgres.h"
|
||||
|
||||
#include "access/heapam.h"
|
||||
#include "access/relscan.h"
|
||||
#include "catalog/catname.h"
|
||||
#include "catalog/indexing.h"
|
||||
#include "catalog/pg_type.h"
|
||||
#include "fmgr.h"
|
||||
#include "miscadmin.h"
|
||||
#include "parser/parse_func.h"
|
||||
#include "storage/lmgr.h"
|
||||
#include "utils/builtins.h"
|
||||
#include "utils/syscache.h"
|
||||
#include "utils/tqual.h"
|
||||
|
||||
#include <utils/syscache.h>
|
||||
#include <catalog/pg_proc.h>
|
||||
#include <access/heapam.h>
|
||||
#include <access/relscan.h>
|
||||
#include <utils/builtins.h>
|
||||
#include <utils/tqual.h>
|
||||
#include <fmgr.h>
|
||||
#include <catalog/catname.h>
|
||||
#include <catalog/indexing.h>
|
||||
#include <catalog/pg_type.h>
|
||||
#include <parser/parse_func.h>
|
||||
#include <storage/lmgr.h>
|
||||
#include <miscadmin.h>
|
||||
#ifndef HAVE_MEMMOVE
|
||||
#include <regex/utils.h>
|
||||
#else
|
||||
@@ -55,14 +55,14 @@ TypeGetWithOpenRelation(Relation pg_type_desc,
|
||||
HeapTuple tup;
|
||||
|
||||
static ScanKeyData typeKey[1] = {
|
||||
{0, Anum_pg_type_typname, NameEqualRegProcedure}
|
||||
{0, Anum_pg_type_typname, F_NAMEEQ}
|
||||
};
|
||||
|
||||
/* ----------------
|
||||
* initialize the scan key and begin a scan of pg_type
|
||||
* ----------------
|
||||
*/
|
||||
fmgr_info(NameEqualRegProcedure, &typeKey[0].sk_func);
|
||||
fmgr_info(F_NAMEEQ, &typeKey[0].sk_func);
|
||||
typeKey[0].sk_nargs = typeKey[0].sk_func.fn_nargs;
|
||||
typeKey[0].sk_argument = PointerGetDatum(typeName);
|
||||
|
||||
@@ -199,7 +199,7 @@ TypeShellMakeWithOpenRelation(Relation pg_type_desc, char *typeName)
|
||||
* ... and fill typdefault with a bogus value
|
||||
*/
|
||||
values[i++] =
|
||||
(Datum) fmgr(TextInRegProcedure, typeName); /* 15 */
|
||||
(Datum) fmgr(F_TEXTIN, typeName); /* 15 */
|
||||
|
||||
/* ----------------
|
||||
* create a new type tuple with FormHeapTuple
|
||||
@@ -322,10 +322,10 @@ TypeCreate(char *typeName,
|
||||
Oid argList[8];
|
||||
|
||||
static ScanKeyData typeKey[1] = {
|
||||
{0, Anum_pg_type_typname, NameEqualRegProcedure}
|
||||
{0, Anum_pg_type_typname, F_NAMEEQ}
|
||||
};
|
||||
|
||||
fmgr_info(NameEqualRegProcedure, &typeKey[0].sk_func);
|
||||
fmgr_info(F_NAMEEQ, &typeKey[0].sk_func);
|
||||
typeKey[0].sk_nargs = typeKey[0].sk_func.fn_nargs;
|
||||
|
||||
/* ----------------
|
||||
@@ -455,7 +455,7 @@ TypeCreate(char *typeName,
|
||||
* initialize the default value for this type.
|
||||
* ----------------
|
||||
*/
|
||||
values[i] = (Datum) fmgr(TextInRegProcedure, /* 16 */
|
||||
values[i] = (Datum) fmgr(F_TEXTIN, /* 16 */
|
||||
PointerIsValid(defaultTypeValue)
|
||||
? defaultTypeValue : "-"); /* XXX default
|
||||
* typdefault */
|
||||
|
||||
Reference in New Issue
Block a user