Re-run pgindent with updated list of typedefs. (Updated README should

avoid this problem in the future.)
This commit is contained in:
Bruce Momjian 2007-11-15 22:25:18 +00:00
parent da0b2cdff8
commit f6e8730d11
124 changed files with 751 additions and 750 deletions

View File

@ -6,7 +6,7 @@
* Copyright (c) 2007, PostgreSQL Global Development Group * Copyright (c) 2007, PostgreSQL Global Development Group
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/contrib/dict_xsyn/dict_xsyn.c,v 1.2 2007/11/15 21:14:29 momjian Exp $ * $PostgreSQL: pgsql/contrib/dict_xsyn/dict_xsyn.c,v 1.3 2007/11/15 22:25:14 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -27,7 +27,7 @@ typedef struct
char *key; /* Word */ char *key; /* Word */
char *value; /* Unparsed list of synonyms, including the char *value; /* Unparsed list of synonyms, including the
* word itself */ * word itself */
} Syn; } Syn;
typedef struct typedef struct
{ {
@ -35,7 +35,7 @@ typedef struct
Syn *syn; Syn *syn;
bool keeporig; bool keeporig;
} DictSyn; } DictSyn;
PG_FUNCTION_INFO_V1(dxsyn_init); PG_FUNCTION_INFO_V1(dxsyn_init);
@ -72,7 +72,7 @@ compare_syn(const void *a, const void *b)
} }
static void static void
read_dictionary(DictSyn * d, char *filename) read_dictionary(DictSyn *d, char *filename)
{ {
char *real_filename = get_tsearch_config_filename(filename, "rules"); char *real_filename = get_tsearch_config_filename(filename, "rules");
FILE *fin; FILE *fin;

View File

@ -36,7 +36,7 @@ typedef struct NODE
int4 type; int4 type;
int4 val; int4 val;
struct NODE *next; struct NODE *next;
} NODE; } NODE;
typedef struct typedef struct
{ {
@ -226,7 +226,7 @@ typedef struct
{ {
int4 *arrb; int4 *arrb;
int4 *arre; int4 *arre;
} CHKVAL; } CHKVAL;
/* /*
* is there value 'val' in array or not ? * is there value 'val' in array or not ?
@ -323,7 +323,7 @@ typedef struct
{ {
ITEM *first; ITEM *first;
bool *mapped_check; bool *mapped_check;
} GinChkVal; } GinChkVal;
static bool static bool
checkcondition_gin(void *checkval, ITEM * item) checkcondition_gin(void *checkval, ITEM * item)
@ -506,7 +506,7 @@ typedef struct
char *buf; char *buf;
char *cur; char *cur;
int4 buflen; int4 buflen;
} INFIX; } INFIX;
#define RESIZEBUF(inf,addsize) while( ( (inf)->cur - (inf)->buf ) + (addsize) + 1 >= (inf)->buflen ) { \ #define RESIZEBUF(inf,addsize) while( ( (inf)->cur - (inf)->buf ) + (addsize) + 1 >= (inf)->buflen ) { \
int4 len = inf->cur - inf->buf; \ int4 len = inf->cur - inf->buf; \
@ -516,7 +516,7 @@ typedef struct
} }
static void static void
infix(INFIX * in, bool first) infix(INFIX *in, bool first)
{ {
if (in->curpol->type == VAL) if (in->curpol->type == VAL)
{ {

View File

@ -343,7 +343,7 @@ typedef struct
{ {
OffsetNumber pos; OffsetNumber pos;
float cost; float cost;
} SPLITCOST; } SPLITCOST;
static int static int
comparecost(const void *a, const void *b) comparecost(const void *a, const void *b)

View File

@ -1,7 +1,7 @@
/* /*
* txtquery io * txtquery io
* Teodor Sigaev <teodor@stack.net> * Teodor Sigaev <teodor@stack.net>
* $PostgreSQL: pgsql/contrib/ltree/ltxtquery_io.c,v 1.13 2007/02/28 22:44:38 tgl Exp $ * $PostgreSQL: pgsql/contrib/ltree/ltxtquery_io.c,v 1.14 2007/11/15 22:25:14 momjian Exp $
*/ */
#include "ltree.h" #include "ltree.h"
@ -32,7 +32,7 @@ typedef struct NODE
int2 length; int2 length;
uint16 flag; uint16 flag;
struct NODE *next; struct NODE *next;
} NODE; } NODE;
typedef struct typedef struct
{ {
@ -384,7 +384,7 @@ typedef struct
char *cur; char *cur;
char *op; char *op;
int4 buflen; int4 buflen;
} INFIX; } INFIX;
#define RESIZEBUF(inf,addsize) \ #define RESIZEBUF(inf,addsize) \
while( ( (inf)->cur - (inf)->buf ) + (addsize) + 1 >= (inf)->buflen ) \ while( ( (inf)->cur - (inf)->buf ) + (addsize) + 1 >= (inf)->buflen ) \
@ -400,7 +400,7 @@ while( ( (inf)->cur - (inf)->buf ) + (addsize) + 1 >= (inf)->buflen ) \
* infix (human-readable) view * infix (human-readable) view
*/ */
static void static void
infix(INFIX * in, bool first) infix(INFIX *in, bool first)
{ {
if (in->curpol->type == VAL) if (in->curpol->type == VAL)
{ {

View File

@ -1,7 +1,7 @@
/* /*
* txtquery operations with ltree * txtquery operations with ltree
* Teodor Sigaev <teodor@stack.net> * Teodor Sigaev <teodor@stack.net>
* $PostgreSQL: pgsql/contrib/ltree/ltxtquery_op.c,v 1.6 2006/03/11 04:38:29 momjian Exp $ * $PostgreSQL: pgsql/contrib/ltree/ltxtquery_op.c,v 1.7 2007/11/15 22:25:14 momjian Exp $
*/ */
#include "ltree.h" #include "ltree.h"
@ -45,7 +45,7 @@ typedef struct
{ {
ltree *node; ltree *node;
char *operand; char *operand;
} CHKVAL; } CHKVAL;
static bool static bool
checkcondition_str(void *checkval, ITEM * val) checkcondition_str(void *checkval, ITEM * val)

View File

@ -6,7 +6,7 @@
* Copyright (c) 2007, PostgreSQL Global Development Group * Copyright (c) 2007, PostgreSQL Global Development Group
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/contrib/test_parser/test_parser.c,v 1.2 2007/11/15 21:14:31 momjian Exp $ * $PostgreSQL: pgsql/contrib/test_parser/test_parser.c,v 1.3 2007/11/15 22:25:14 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -35,7 +35,7 @@ typedef struct
int lexid; int lexid;
char *alias; char *alias;
char *descr; char *descr;
} LexDescr; } LexDescr;
/* /*
* prototypes * prototypes

View File

@ -4,7 +4,7 @@
* *
* Copyright (c) 2007 PostgreSQL Global Development Group * Copyright (c) 2007 PostgreSQL Global Development Group
* *
* $PostgreSQL: pgsql/contrib/uuid-ossp/uuid-ossp.c,v 1.4 2007/11/15 21:14:31 momjian Exp $ * $PostgreSQL: pgsql/contrib/uuid-ossp/uuid-ossp.c,v 1.5 2007/11/15 22:25:14 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -165,7 +165,7 @@ uuid_generate_v1mc(PG_FUNCTION_ARGS)
static Datum static Datum
uuid_generate_v35_internal(int mode, pg_uuid_t * ns, text *name) uuid_generate_v35_internal(int mode, pg_uuid_t *ns, text *name)
{ {
uuid_t *ns_uuid; uuid_t *ns_uuid;
Datum result; Datum result;

View File

@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/access/gin/ginutil.c,v 1.11 2007/11/15 21:14:31 momjian Exp $ * $PostgreSQL: pgsql/src/backend/access/gin/ginutil.c,v 1.12 2007/11/15 22:25:14 momjian Exp $
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -133,10 +133,10 @@ typedef struct
{ {
FmgrInfo *cmpDatumFunc; FmgrInfo *cmpDatumFunc;
bool *needUnique; bool *needUnique;
} cmpEntriesData; } cmpEntriesData;
static int static int
cmpEntries(const Datum *a, const Datum *b, cmpEntriesData * arg) cmpEntries(const Datum *a, const Datum *b, cmpEntriesData *arg)
{ {
int res = DatumGetInt32(FunctionCall2(arg->cmpDatumFunc, int res = DatumGetInt32(FunctionCall2(arg->cmpDatumFunc,
*a, *b)); *a, *b));

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/access/heap/pruneheap.c,v 1.4 2007/11/15 21:14:32 momjian Exp $ * $PostgreSQL: pgsql/src/backend/access/heap/pruneheap.c,v 1.5 2007/11/15 22:25:15 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -75,11 +75,11 @@ heap_page_prune_opt(Relation relation, Buffer buffer, TransactionId OldestXmin)
* fill-factor target (but not less than 10%). * fill-factor target (but not less than 10%).
* *
* Checking free space here is questionable since we aren't holding any * Checking free space here is questionable since we aren't holding any
* lock on the buffer; in the worst case we could get a bogus answer. * lock on the buffer; in the worst case we could get a bogus answer. It's
* It's unlikely to be *seriously* wrong, though, since reading either * unlikely to be *seriously* wrong, though, since reading either pd_lower
* pd_lower or pd_upper is probably atomic. Avoiding taking a lock seems * or pd_upper is probably atomic. Avoiding taking a lock seems better
* better than sometimes getting a wrong answer in what is after all just * than sometimes getting a wrong answer in what is after all just a
* a heuristic estimate. * heuristic estimate.
*/ */
minfree = RelationGetTargetPageFreeSpace(relation, minfree = RelationGetTargetPageFreeSpace(relation,
HEAP_DEFAULT_FILLFACTOR); HEAP_DEFAULT_FILLFACTOR);

View File

@ -96,7 +96,7 @@
* Portions Copyright (c) 1994-5, Regents of the University of California * Portions Copyright (c) 1994-5, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/access/heap/rewriteheap.c,v 1.8 2007/11/15 21:14:32 momjian Exp $ * $PostgreSQL: pgsql/src/backend/access/heap/rewriteheap.c,v 1.9 2007/11/15 22:25:15 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -129,7 +129,7 @@ typedef struct RewriteStateData
* them */ * them */
HTAB *rs_unresolved_tups; /* unmatched A tuples */ HTAB *rs_unresolved_tups; /* unmatched A tuples */
HTAB *rs_old_new_tid_map; /* unmatched B tuples */ HTAB *rs_old_new_tid_map; /* unmatched B tuples */
} RewriteStateData; } RewriteStateData;
/* /*
* The lookup keys for the hash tables are tuple TID and xmin (we must check * The lookup keys for the hash tables are tuple TID and xmin (we must check
@ -141,7 +141,7 @@ typedef struct
{ {
TransactionId xmin; /* tuple xmin */ TransactionId xmin; /* tuple xmin */
ItemPointerData tid; /* tuple location in old heap */ ItemPointerData tid; /* tuple location in old heap */
} TidHashKey; } TidHashKey;
/* /*
* Entry structures for the hash tables * Entry structures for the hash tables
@ -151,7 +151,7 @@ typedef struct
TidHashKey key; /* expected xmin/old location of B tuple */ TidHashKey key; /* expected xmin/old location of B tuple */
ItemPointerData old_tid; /* A's location in the old heap */ ItemPointerData old_tid; /* A's location in the old heap */
HeapTuple tuple; /* A's tuple contents */ HeapTuple tuple; /* A's tuple contents */
} UnresolvedTupData; } UnresolvedTupData;
typedef UnresolvedTupData *UnresolvedTup; typedef UnresolvedTupData *UnresolvedTup;
@ -159,7 +159,7 @@ typedef struct
{ {
TidHashKey key; /* actual xmin/old location of B tuple */ TidHashKey key; /* actual xmin/old location of B tuple */
ItemPointerData new_tid; /* where we put it in the new heap */ ItemPointerData new_tid; /* where we put it in the new heap */
} OldToNewMappingData; } OldToNewMappingData;
typedef OldToNewMappingData *OldToNewMapping; typedef OldToNewMappingData *OldToNewMapping;
@ -425,8 +425,8 @@ rewrite_heap_tuple(RewriteState state,
* If the tuple is the updated version of a row, and the prior version * If the tuple is the updated version of a row, and the prior version
* wouldn't be DEAD yet, then we need to either resolve the prior * wouldn't be DEAD yet, then we need to either resolve the prior
* version (if it's waiting in rs_unresolved_tups), or make an entry * version (if it's waiting in rs_unresolved_tups), or make an entry
* in rs_old_new_tid_map (so we can resolve it when we do see it). * in rs_old_new_tid_map (so we can resolve it when we do see it). The
* The previous tuple's xmax would equal this one's xmin, so it's * previous tuple's xmax would equal this one's xmin, so it's
* RECENTLY_DEAD if and only if the xmin is not before OldestXmin. * RECENTLY_DEAD if and only if the xmin is not before OldestXmin.
*/ */
if ((new_tuple->t_data->t_infomask & HEAP_UPDATED) && if ((new_tuple->t_data->t_infomask & HEAP_UPDATED) &&

View File

@ -40,7 +40,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/access/heap/syncscan.c,v 1.2 2007/11/15 21:14:32 momjian Exp $ * $PostgreSQL: pgsql/src/backend/access/heap/syncscan.c,v 1.3 2007/11/15 22:25:15 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -89,21 +89,21 @@ typedef struct ss_scan_location_t
{ {
RelFileNode relfilenode; /* identity of a relation */ RelFileNode relfilenode; /* identity of a relation */
BlockNumber location; /* last-reported location in the relation */ BlockNumber location; /* last-reported location in the relation */
} ss_scan_location_t; } ss_scan_location_t;
typedef struct ss_lru_item_t typedef struct ss_lru_item_t
{ {
struct ss_lru_item_t *prev; struct ss_lru_item_t *prev;
struct ss_lru_item_t *next; struct ss_lru_item_t *next;
ss_scan_location_t location; ss_scan_location_t location;
} ss_lru_item_t; } ss_lru_item_t;
typedef struct ss_scan_locations_t typedef struct ss_scan_locations_t
{ {
ss_lru_item_t *head; ss_lru_item_t *head;
ss_lru_item_t *tail; ss_lru_item_t *tail;
ss_lru_item_t items[1]; /* SYNC_SCAN_NELEM items */ ss_lru_item_t items[1]; /* SYNC_SCAN_NELEM items */
} ss_scan_locations_t; } ss_scan_locations_t;
#define SizeOfScanLocations(N) offsetof(ss_scan_locations_t, items[N]) #define SizeOfScanLocations(N) offsetof(ss_scan_locations_t, items[N])

View File

@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtxlog.c,v 1.47 2007/11/15 21:14:32 momjian Exp $ * $PostgreSQL: pgsql/src/backend/access/nbtree/nbtxlog.c,v 1.48 2007/11/15 22:25:15 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -40,7 +40,7 @@ typedef struct bt_incomplete_action
BlockNumber rightblk; /* right half of split */ BlockNumber rightblk; /* right half of split */
/* these fields are for a delete: */ /* these fields are for a delete: */
BlockNumber delblk; /* parent block to be deleted */ BlockNumber delblk; /* parent block to be deleted */
} bt_incomplete_action; } bt_incomplete_action;
static List *incomplete_actions; static List *incomplete_actions;

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.289 2007/11/15 22:02:12 petere Exp $ * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.290 2007/11/15 22:25:15 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -1345,8 +1345,8 @@ static bool
XLogCheckpointNeeded(void) XLogCheckpointNeeded(void)
{ {
/* /*
* A straight computation of segment number could overflow 32 bits. * A straight computation of segment number could overflow 32 bits. Rather
* Rather than assuming we have working 64-bit arithmetic, we compare the * than assuming we have working 64-bit arithmetic, we compare the
* highest-order bits separately, and force a checkpoint immediately when * highest-order bits separately, and force a checkpoint immediately when
* they change. * they change.
*/ */

View File

@ -13,7 +13,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/catalog/namespace.c,v 1.100 2007/11/15 21:14:33 momjian Exp $ * $PostgreSQL: pgsql/src/backend/catalog/namespace.c,v 1.101 2007/11/15 22:25:15 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -147,7 +147,7 @@ typedef struct
List *searchPath; /* the desired search path */ List *searchPath; /* the desired search path */
Oid creationNamespace; /* the desired creation namespace */ Oid creationNamespace; /* the desired creation namespace */
int nestLevel; /* subtransaction nesting level */ int nestLevel; /* subtransaction nesting level */
} OverrideStackEntry; } OverrideStackEntry;
static List *overrideStack = NIL; static List *overrideStack = NIL;
@ -2266,7 +2266,7 @@ GetOverrideSearchPath(MemoryContext context)
* search_path variable is ignored while an override is active. * search_path variable is ignored while an override is active.
*/ */
void void
PushOverrideSearchPath(OverrideSearchPath * newpath) PushOverrideSearchPath(OverrideSearchPath *newpath)
{ {
OverrideStackEntry *entry; OverrideStackEntry *entry;
List *oidlist; List *oidlist;

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/analyze.c,v 1.111 2007/11/15 21:14:33 momjian Exp $ * $PostgreSQL: pgsql/src/backend/commands/analyze.c,v 1.112 2007/11/15 22:25:15 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -1346,7 +1346,7 @@ typedef struct
FmgrInfo *cmpFn; FmgrInfo *cmpFn;
int cmpFlags; int cmpFlags;
int *tupnoLink; int *tupnoLink;
} CompareScalarsContext; } CompareScalarsContext;
static void compute_minimal_stats(VacAttrStatsP stats, static void compute_minimal_stats(VacAttrStatsP stats,

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/discard.c,v 1.2 2007/11/15 21:14:33 momjian Exp $ * $PostgreSQL: pgsql/src/backend/commands/discard.c,v 1.3 2007/11/15 22:25:15 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -28,7 +28,7 @@ static void DiscardAll(bool isTopLevel);
* DISCARD { ALL | TEMP | PLANS } * DISCARD { ALL | TEMP | PLANS }
*/ */
void void
DiscardCommand(DiscardStmt * stmt, bool isTopLevel) DiscardCommand(DiscardStmt *stmt, bool isTopLevel)
{ {
switch (stmt->target) switch (stmt->target)
{ {

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1994-5, Regents of the University of California * Portions Copyright (c) 1994-5, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/explain.c,v 1.166 2007/11/15 21:14:33 momjian Exp $ * $PostgreSQL: pgsql/src/backend/commands/explain.c,v 1.167 2007/11/15 22:25:15 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -216,7 +216,7 @@ ExplainOneUtility(Node *utilityStmt, ExplainStmt *stmt,
* to call it. * to call it.
*/ */
void void
ExplainOnePlan(PlannedStmt * plannedstmt, ParamListInfo params, ExplainOnePlan(PlannedStmt *plannedstmt, ParamListInfo params,
ExplainStmt *stmt, TupOutputState *tstate) ExplainStmt *stmt, TupOutputState *tstate)
{ {
QueryDesc *queryDesc; QueryDesc *queryDesc;

View File

@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/opclasscmds.c,v 1.56 2007/11/15 21:14:33 momjian Exp $ * $PostgreSQL: pgsql/src/backend/commands/opclasscmds.c,v 1.57 2007/11/15 22:25:15 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -52,7 +52,7 @@ typedef struct
Oid lefttype; /* lefttype */ Oid lefttype; /* lefttype */
Oid righttype; /* righttype */ Oid righttype; /* righttype */
bool recheck; /* oper recheck flag (unused for proc) */ bool recheck; /* oper recheck flag (unused for proc) */
} OpFamilyMember; } OpFamilyMember;
static void AlterOpFamilyAdd(List *opfamilyname, Oid amoid, Oid opfamilyoid, static void AlterOpFamilyAdd(List *opfamilyname, Oid amoid, Oid opfamilyoid,
@ -62,9 +62,9 @@ static void AlterOpFamilyDrop(List *opfamilyname, Oid amoid, Oid opfamilyoid,
int maxOpNumber, int maxProcNumber, int maxOpNumber, int maxProcNumber,
List *items); List *items);
static void processTypesSpec(List *args, Oid *lefttype, Oid *righttype); static void processTypesSpec(List *args, Oid *lefttype, Oid *righttype);
static void assignOperTypes(OpFamilyMember * member, Oid amoid, Oid typeoid); static void assignOperTypes(OpFamilyMember *member, Oid amoid, Oid typeoid);
static void assignProcTypes(OpFamilyMember * member, Oid amoid, Oid typeoid); static void assignProcTypes(OpFamilyMember *member, Oid amoid, Oid typeoid);
static void addFamilyMember(List **list, OpFamilyMember * member, bool isProc); static void addFamilyMember(List **list, OpFamilyMember *member, bool isProc);
static void storeOperators(List *opfamilyname, Oid amoid, static void storeOperators(List *opfamilyname, Oid amoid,
Oid opfamilyoid, Oid opclassoid, Oid opfamilyoid, Oid opclassoid,
List *operators, bool isAdd); List *operators, bool isAdd);
@ -646,7 +646,7 @@ DefineOpClass(CreateOpClassStmt *stmt)
* Define a new index operator family. * Define a new index operator family.
*/ */
void void
DefineOpFamily(CreateOpFamilyStmt * stmt) DefineOpFamily(CreateOpFamilyStmt *stmt)
{ {
char *opfname; /* name of opfamily we're creating */ char *opfname; /* name of opfamily we're creating */
Oid amoid, /* our AM's oid */ Oid amoid, /* our AM's oid */
@ -765,7 +765,7 @@ DefineOpFamily(CreateOpFamilyStmt * stmt)
* different code paths. * different code paths.
*/ */
void void
AlterOpFamily(AlterOpFamilyStmt * stmt) AlterOpFamily(AlterOpFamilyStmt *stmt)
{ {
Oid amoid, /* our AM's oid */ Oid amoid, /* our AM's oid */
opfamilyoid; /* oid of opfamily */ opfamilyoid; /* oid of opfamily */
@ -1059,7 +1059,7 @@ processTypesSpec(List *args, Oid *lefttype, Oid *righttype)
* and do any validity checking we can manage. * and do any validity checking we can manage.
*/ */
static void static void
assignOperTypes(OpFamilyMember * member, Oid amoid, Oid typeoid) assignOperTypes(OpFamilyMember *member, Oid amoid, Oid typeoid)
{ {
Operator optup; Operator optup;
Form_pg_operator opform; Form_pg_operator opform;
@ -1100,7 +1100,7 @@ assignOperTypes(OpFamilyMember * member, Oid amoid, Oid typeoid)
* and do any validity checking we can manage. * and do any validity checking we can manage.
*/ */
static void static void
assignProcTypes(OpFamilyMember * member, Oid amoid, Oid typeoid) assignProcTypes(OpFamilyMember *member, Oid amoid, Oid typeoid)
{ {
HeapTuple proctup; HeapTuple proctup;
Form_pg_proc procform; Form_pg_proc procform;
@ -1181,7 +1181,7 @@ assignProcTypes(OpFamilyMember * member, Oid amoid, Oid typeoid)
* duplicated strategy or proc number. * duplicated strategy or proc number.
*/ */
static void static void
addFamilyMember(List **list, OpFamilyMember * member, bool isProc) addFamilyMember(List **list, OpFamilyMember *member, bool isProc)
{ {
ListCell *l; ListCell *l;
@ -1562,7 +1562,7 @@ RemoveOpClass(RemoveOpClassStmt *stmt)
* Deletes an opfamily. * Deletes an opfamily.
*/ */
void void
RemoveOpFamily(RemoveOpFamilyStmt * stmt) RemoveOpFamily(RemoveOpFamilyStmt *stmt)
{ {
Oid amID, Oid amID,
opfID; opfID;

View File

@ -14,7 +14,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/portalcmds.c,v 1.67 2007/11/15 21:14:33 momjian Exp $ * $PostgreSQL: pgsql/src/backend/commands/portalcmds.c,v 1.68 2007/11/15 22:25:15 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -39,7 +39,7 @@
* utilityStmt field is set. * utilityStmt field is set.
*/ */
void void
PerformCursorOpen(PlannedStmt * stmt, ParamListInfo params, PerformCursorOpen(PlannedStmt *stmt, ParamListInfo params,
const char *queryString, bool isTopLevel) const char *queryString, bool isTopLevel)
{ {
DeclareCursorStmt *cstmt = (DeclareCursorStmt *) stmt->utilityStmt; DeclareCursorStmt *cstmt = (DeclareCursorStmt *) stmt->utilityStmt;

View File

@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/tsearchcmds.c,v 1.6 2007/11/15 21:14:34 momjian Exp $ * $PostgreSQL: pgsql/src/backend/commands/tsearchcmds.c,v 1.7 2007/11/15 22:25:15 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -46,9 +46,9 @@
#include "utils/syscache.h" #include "utils/syscache.h"
static void MakeConfigurationMapping(AlterTSConfigurationStmt * stmt, static void MakeConfigurationMapping(AlterTSConfigurationStmt *stmt,
HeapTuple tup, Relation relMap); HeapTuple tup, Relation relMap);
static void DropConfigurationMapping(AlterTSConfigurationStmt * stmt, static void DropConfigurationMapping(AlterTSConfigurationStmt *stmt,
HeapTuple tup, Relation relMap); HeapTuple tup, Relation relMap);
@ -691,7 +691,7 @@ RemoveTSDictionaryById(Oid dictId)
* ALTER TEXT SEARCH DICTIONARY * ALTER TEXT SEARCH DICTIONARY
*/ */
void void
AlterTSDictionary(AlterTSDictionaryStmt * stmt) AlterTSDictionary(AlterTSDictionaryStmt *stmt)
{ {
HeapTuple tup, HeapTuple tup,
newtup; newtup;
@ -1632,7 +1632,7 @@ AlterTSConfigurationOwner(List *name, Oid newOwnerId)
* ALTER TEXT SEARCH CONFIGURATION - main entry point * ALTER TEXT SEARCH CONFIGURATION - main entry point
*/ */
void void
AlterTSConfiguration(AlterTSConfigurationStmt * stmt) AlterTSConfiguration(AlterTSConfigurationStmt *stmt)
{ {
HeapTuple tup; HeapTuple tup;
Relation relMap; Relation relMap;
@ -1726,7 +1726,7 @@ getTokenTypes(Oid prsId, List *tokennames)
* ALTER TEXT SEARCH CONFIGURATION ADD/ALTER MAPPING * ALTER TEXT SEARCH CONFIGURATION ADD/ALTER MAPPING
*/ */
static void static void
MakeConfigurationMapping(AlterTSConfigurationStmt * stmt, MakeConfigurationMapping(AlterTSConfigurationStmt *stmt,
HeapTuple tup, Relation relMap) HeapTuple tup, Relation relMap)
{ {
Oid cfgId = HeapTupleGetOid(tup); Oid cfgId = HeapTupleGetOid(tup);
@ -1888,7 +1888,7 @@ MakeConfigurationMapping(AlterTSConfigurationStmt * stmt,
* ALTER TEXT SEARCH CONFIGURATION DROP MAPPING * ALTER TEXT SEARCH CONFIGURATION DROP MAPPING
*/ */
static void static void
DropConfigurationMapping(AlterTSConfigurationStmt * stmt, DropConfigurationMapping(AlterTSConfigurationStmt *stmt,
HeapTuple tup, Relation relMap) HeapTuple tup, Relation relMap)
{ {
Oid cfgId = HeapTupleGetOid(tup); Oid cfgId = HeapTupleGetOid(tup);
@ -2031,7 +2031,7 @@ deserialize_deflist(Datum txt)
CS_INSQVALUE, CS_INSQVALUE,
CS_INDQVALUE, CS_INDQVALUE,
CS_INWVALUE CS_INWVALUE
} ds_state; } ds_state;
ds_state state = CS_WAITKEY; ds_state state = CS_WAITKEY;
workspace = (char *) palloc(len + 1); /* certainly enough room */ workspace = (char *) palloc(len + 1); /* certainly enough room */

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/typecmds.c,v 1.111 2007/11/15 21:14:34 momjian Exp $ * $PostgreSQL: pgsql/src/backend/commands/typecmds.c,v 1.112 2007/11/15 22:25:15 momjian Exp $
* *
* DESCRIPTION * DESCRIPTION
* The "DefineFoo" routines take the parse tree and pick out the * The "DefineFoo" routines take the parse tree and pick out the
@ -995,7 +995,7 @@ RemoveDomain(List *names, DropBehavior behavior, bool missing_ok)
* Registers a new enum. * Registers a new enum.
*/ */
void void
DefineEnum(CreateEnumStmt * stmt) DefineEnum(CreateEnumStmt *stmt)
{ {
char *enumName; char *enumName;
char *enumArrayName; char *enumArrayName;

View File

@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/backend/executor/execCurrent.c,v 1.3 2007/11/15 21:14:34 momjian Exp $ * $PostgreSQL: pgsql/src/backend/executor/execCurrent.c,v 1.4 2007/11/15 22:25:15 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -36,7 +36,7 @@ static ScanState *search_plan_tree(PlanState *node, Oid table_oid);
* valid updatable scan of the specified table. * valid updatable scan of the specified table.
*/ */
bool bool
execCurrentOf(CurrentOfExpr * cexpr, execCurrentOf(CurrentOfExpr *cexpr,
ExprContext *econtext, ExprContext *econtext,
Oid table_oid, Oid table_oid,
ItemPointer current_tid) ItemPointer current_tid)

View File

@ -26,7 +26,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/execMain.c,v 1.299 2007/11/15 21:14:34 momjian Exp $ * $PostgreSQL: pgsql/src/backend/executor/execMain.c,v 1.300 2007/11/15 22:25:15 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -95,7 +95,7 @@ static TupleTableSlot *EvalPlanQualNext(EState *estate);
static void EndEvalPlanQual(EState *estate); static void EndEvalPlanQual(EState *estate);
static void ExecCheckRTPerms(List *rangeTable); static void ExecCheckRTPerms(List *rangeTable);
static void ExecCheckRTEPerms(RangeTblEntry *rte); static void ExecCheckRTEPerms(RangeTblEntry *rte);
static void ExecCheckXactReadOnly(PlannedStmt * plannedstmt); static void ExecCheckXactReadOnly(PlannedStmt *plannedstmt);
static void EvalPlanQualStart(evalPlanQual *epq, EState *estate, static void EvalPlanQualStart(evalPlanQual *epq, EState *estate,
evalPlanQual *priorepq); evalPlanQual *priorepq);
static void EvalPlanQualStop(evalPlanQual *epq); static void EvalPlanQualStop(evalPlanQual *epq);
@ -411,7 +411,7 @@ ExecCheckRTEPerms(RangeTblEntry *rte)
* Check that the query does not imply any writes to non-temp tables. * Check that the query does not imply any writes to non-temp tables.
*/ */
static void static void
ExecCheckXactReadOnly(PlannedStmt * plannedstmt) ExecCheckXactReadOnly(PlannedStmt *plannedstmt)
{ {
ListCell *l; ListCell *l;

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/execQual.c,v 1.224 2007/11/15 21:14:34 momjian Exp $ * $PostgreSQL: pgsql/src/backend/executor/execQual.c,v 1.225 2007/11/15 22:25:15 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -121,7 +121,7 @@ static Datum ExecEvalCoalesce(CoalesceExprState *coalesceExpr,
static Datum ExecEvalMinMax(MinMaxExprState *minmaxExpr, static Datum ExecEvalMinMax(MinMaxExprState *minmaxExpr,
ExprContext *econtext, ExprContext *econtext,
bool *isNull, ExprDoneCond *isDone); bool *isNull, ExprDoneCond *isDone);
static Datum ExecEvalXml(XmlExprState * xmlExpr, ExprContext *econtext, static Datum ExecEvalXml(XmlExprState *xmlExpr, ExprContext *econtext,
bool *isNull, ExprDoneCond *isDone); bool *isNull, ExprDoneCond *isDone);
static Datum ExecEvalNullIf(FuncExprState *nullIfExpr, static Datum ExecEvalNullIf(FuncExprState *nullIfExpr,
ExprContext *econtext, ExprContext *econtext,
@ -147,10 +147,10 @@ static Datum ExecEvalFieldStore(FieldStoreState *fstate,
static Datum ExecEvalRelabelType(GenericExprState *exprstate, static Datum ExecEvalRelabelType(GenericExprState *exprstate,
ExprContext *econtext, ExprContext *econtext,
bool *isNull, ExprDoneCond *isDone); bool *isNull, ExprDoneCond *isDone);
static Datum ExecEvalCoerceViaIO(CoerceViaIOState * iostate, static Datum ExecEvalCoerceViaIO(CoerceViaIOState *iostate,
ExprContext *econtext, ExprContext *econtext,
bool *isNull, ExprDoneCond *isDone); bool *isNull, ExprDoneCond *isDone);
static Datum ExecEvalArrayCoerceExpr(ArrayCoerceExprState * astate, static Datum ExecEvalArrayCoerceExpr(ArrayCoerceExprState *astate,
ExprContext *econtext, ExprContext *econtext,
bool *isNull, ExprDoneCond *isDone); bool *isNull, ExprDoneCond *isDone);
static Datum ExecEvalCurrentOfExpr(ExprState *exprstate, ExprContext *econtext, static Datum ExecEvalCurrentOfExpr(ExprState *exprstate, ExprContext *econtext,
@ -2844,7 +2844,7 @@ ExecEvalMinMax(MinMaxExprState *minmaxExpr, ExprContext *econtext,
* ---------------------------------------------------------------- * ----------------------------------------------------------------
*/ */
static Datum static Datum
ExecEvalXml(XmlExprState * xmlExpr, ExprContext *econtext, ExecEvalXml(XmlExprState *xmlExpr, ExprContext *econtext,
bool *isNull, ExprDoneCond *isDone) bool *isNull, ExprDoneCond *isDone)
{ {
XmlExpr *xexpr = (XmlExpr *) xmlExpr->xprstate.expr; XmlExpr *xexpr = (XmlExpr *) xmlExpr->xprstate.expr;
@ -3587,7 +3587,7 @@ ExecEvalRelabelType(GenericExprState *exprstate,
* ---------------------------------------------------------------- * ----------------------------------------------------------------
*/ */
static Datum static Datum
ExecEvalCoerceViaIO(CoerceViaIOState * iostate, ExecEvalCoerceViaIO(CoerceViaIOState *iostate,
ExprContext *econtext, ExprContext *econtext,
bool *isNull, ExprDoneCond *isDone) bool *isNull, ExprDoneCond *isDone)
{ {
@ -3621,7 +3621,7 @@ ExecEvalCoerceViaIO(CoerceViaIOState * iostate,
* ---------------------------------------------------------------- * ----------------------------------------------------------------
*/ */
static Datum static Datum
ExecEvalArrayCoerceExpr(ArrayCoerceExprState * astate, ExecEvalArrayCoerceExpr(ArrayCoerceExprState *astate,
ExprContext *econtext, ExprContext *econtext,
bool *isNull, ExprDoneCond *isDone) bool *isNull, ExprDoneCond *isDone)
{ {

View File

@ -15,7 +15,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.384 2007/11/15 21:14:35 momjian Exp $ * $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.385 2007/11/15 22:25:15 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -68,7 +68,7 @@
* _copyPlannedStmt * _copyPlannedStmt
*/ */
static PlannedStmt * static PlannedStmt *
_copyPlannedStmt(PlannedStmt * from) _copyPlannedStmt(PlannedStmt *from)
{ {
PlannedStmt *newnode = makeNode(PlannedStmt); PlannedStmt *newnode = makeNode(PlannedStmt);
@ -727,7 +727,7 @@ _copyRangeVar(RangeVar *from)
* _copyIntoClause * _copyIntoClause
*/ */
static IntoClause * static IntoClause *
_copyIntoClause(IntoClause * from) _copyIntoClause(IntoClause *from)
{ {
IntoClause *newnode = makeNode(IntoClause); IntoClause *newnode = makeNode(IntoClause);
@ -1026,7 +1026,7 @@ _copyRelabelType(RelabelType *from)
* _copyCoerceViaIO * _copyCoerceViaIO
*/ */
static CoerceViaIO * static CoerceViaIO *
_copyCoerceViaIO(CoerceViaIO * from) _copyCoerceViaIO(CoerceViaIO *from)
{ {
CoerceViaIO *newnode = makeNode(CoerceViaIO); CoerceViaIO *newnode = makeNode(CoerceViaIO);
@ -1041,7 +1041,7 @@ _copyCoerceViaIO(CoerceViaIO * from)
* _copyArrayCoerceExpr * _copyArrayCoerceExpr
*/ */
static ArrayCoerceExpr * static ArrayCoerceExpr *
_copyArrayCoerceExpr(ArrayCoerceExpr * from) _copyArrayCoerceExpr(ArrayCoerceExpr *from)
{ {
ArrayCoerceExpr *newnode = makeNode(ArrayCoerceExpr); ArrayCoerceExpr *newnode = makeNode(ArrayCoerceExpr);
@ -1195,7 +1195,7 @@ _copyMinMaxExpr(MinMaxExpr *from)
* _copyXmlExpr * _copyXmlExpr
*/ */
static XmlExpr * static XmlExpr *
_copyXmlExpr(XmlExpr * from) _copyXmlExpr(XmlExpr *from)
{ {
XmlExpr *newnode = makeNode(XmlExpr); XmlExpr *newnode = makeNode(XmlExpr);
@ -1304,7 +1304,7 @@ _copySetToDefault(SetToDefault *from)
* _copyCurrentOfExpr * _copyCurrentOfExpr
*/ */
static CurrentOfExpr * static CurrentOfExpr *
_copyCurrentOfExpr(CurrentOfExpr * from) _copyCurrentOfExpr(CurrentOfExpr *from)
{ {
CurrentOfExpr *newnode = makeNode(CurrentOfExpr); CurrentOfExpr *newnode = makeNode(CurrentOfExpr);
@ -1393,7 +1393,7 @@ _copyFromExpr(FromExpr *from)
* _copyPathKey * _copyPathKey
*/ */
static PathKey * static PathKey *
_copyPathKey(PathKey * from) _copyPathKey(PathKey *from)
{ {
PathKey *newnode = makeNode(PathKey); PathKey *newnode = makeNode(PathKey);
@ -1833,7 +1833,7 @@ _copyLockingClause(LockingClause *from)
} }
static XmlSerialize * static XmlSerialize *
_copyXmlSerialize(XmlSerialize * from) _copyXmlSerialize(XmlSerialize *from)
{ {
XmlSerialize *newnode = makeNode(XmlSerialize); XmlSerialize *newnode = makeNode(XmlSerialize);
@ -2271,7 +2271,7 @@ _copyRemoveOpClassStmt(RemoveOpClassStmt *from)
} }
static RemoveOpFamilyStmt * static RemoveOpFamilyStmt *
_copyRemoveOpFamilyStmt(RemoveOpFamilyStmt * from) _copyRemoveOpFamilyStmt(RemoveOpFamilyStmt *from)
{ {
RemoveOpFamilyStmt *newnode = makeNode(RemoveOpFamilyStmt); RemoveOpFamilyStmt *newnode = makeNode(RemoveOpFamilyStmt);
@ -2398,7 +2398,7 @@ _copyCompositeTypeStmt(CompositeTypeStmt *from)
} }
static CreateEnumStmt * static CreateEnumStmt *
_copyCreateEnumStmt(CreateEnumStmt * from) _copyCreateEnumStmt(CreateEnumStmt *from)
{ {
CreateEnumStmt *newnode = makeNode(CreateEnumStmt); CreateEnumStmt *newnode = makeNode(CreateEnumStmt);
@ -2475,7 +2475,7 @@ _copyCreateOpClassItem(CreateOpClassItem *from)
} }
static CreateOpFamilyStmt * static CreateOpFamilyStmt *
_copyCreateOpFamilyStmt(CreateOpFamilyStmt * from) _copyCreateOpFamilyStmt(CreateOpFamilyStmt *from)
{ {
CreateOpFamilyStmt *newnode = makeNode(CreateOpFamilyStmt); CreateOpFamilyStmt *newnode = makeNode(CreateOpFamilyStmt);
@ -2486,7 +2486,7 @@ _copyCreateOpFamilyStmt(CreateOpFamilyStmt * from)
} }
static AlterOpFamilyStmt * static AlterOpFamilyStmt *
_copyAlterOpFamilyStmt(AlterOpFamilyStmt * from) _copyAlterOpFamilyStmt(AlterOpFamilyStmt *from)
{ {
AlterOpFamilyStmt *newnode = makeNode(AlterOpFamilyStmt); AlterOpFamilyStmt *newnode = makeNode(AlterOpFamilyStmt);
@ -2616,7 +2616,7 @@ _copyVariableShowStmt(VariableShowStmt *from)
} }
static DiscardStmt * static DiscardStmt *
_copyDiscardStmt(DiscardStmt * from) _copyDiscardStmt(DiscardStmt *from)
{ {
DiscardStmt *newnode = makeNode(DiscardStmt); DiscardStmt *newnode = makeNode(DiscardStmt);

View File

@ -18,7 +18,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.314 2007/11/15 21:14:35 momjian Exp $ * $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.315 2007/11/15 22:25:15 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -103,7 +103,7 @@ _equalRangeVar(RangeVar *a, RangeVar *b)
} }
static bool static bool
_equalIntoClause(IntoClause * a, IntoClause * b) _equalIntoClause(IntoClause *a, IntoClause *b)
{ {
COMPARE_NODE_FIELD(rel); COMPARE_NODE_FIELD(rel);
COMPARE_NODE_FIELD(colNames); COMPARE_NODE_FIELD(colNames);
@ -360,7 +360,7 @@ _equalRelabelType(RelabelType *a, RelabelType *b)
} }
static bool static bool
_equalCoerceViaIO(CoerceViaIO * a, CoerceViaIO * b) _equalCoerceViaIO(CoerceViaIO *a, CoerceViaIO *b)
{ {
COMPARE_NODE_FIELD(arg); COMPARE_NODE_FIELD(arg);
COMPARE_SCALAR_FIELD(resulttype); COMPARE_SCALAR_FIELD(resulttype);
@ -378,7 +378,7 @@ _equalCoerceViaIO(CoerceViaIO * a, CoerceViaIO * b)
} }
static bool static bool
_equalArrayCoerceExpr(ArrayCoerceExpr * a, ArrayCoerceExpr * b) _equalArrayCoerceExpr(ArrayCoerceExpr *a, ArrayCoerceExpr *b)
{ {
COMPARE_NODE_FIELD(arg); COMPARE_NODE_FIELD(arg);
COMPARE_SCALAR_FIELD(elemfuncid); COMPARE_SCALAR_FIELD(elemfuncid);
@ -506,7 +506,7 @@ _equalMinMaxExpr(MinMaxExpr *a, MinMaxExpr *b)
} }
static bool static bool
_equalXmlExpr(XmlExpr * a, XmlExpr * b) _equalXmlExpr(XmlExpr *a, XmlExpr *b)
{ {
COMPARE_SCALAR_FIELD(op); COMPARE_SCALAR_FIELD(op);
COMPARE_STRING_FIELD(name); COMPARE_STRING_FIELD(name);
@ -599,7 +599,7 @@ _equalSetToDefault(SetToDefault *a, SetToDefault *b)
} }
static bool static bool
_equalCurrentOfExpr(CurrentOfExpr * a, CurrentOfExpr * b) _equalCurrentOfExpr(CurrentOfExpr *a, CurrentOfExpr *b)
{ {
COMPARE_SCALAR_FIELD(cvarno); COMPARE_SCALAR_FIELD(cvarno);
COMPARE_STRING_FIELD(cursor_name); COMPARE_STRING_FIELD(cursor_name);
@ -660,7 +660,7 @@ _equalFromExpr(FromExpr *a, FromExpr *b)
*/ */
static bool static bool
_equalPathKey(PathKey * a, PathKey * b) _equalPathKey(PathKey *a, PathKey *b)
{ {
/* /*
* This is normally used on non-canonicalized PathKeys, so must chase up * This is normally used on non-canonicalized PathKeys, so must chase up
@ -1112,7 +1112,7 @@ _equalRemoveOpClassStmt(RemoveOpClassStmt *a, RemoveOpClassStmt *b)
} }
static bool static bool
_equalRemoveOpFamilyStmt(RemoveOpFamilyStmt * a, RemoveOpFamilyStmt * b) _equalRemoveOpFamilyStmt(RemoveOpFamilyStmt *a, RemoveOpFamilyStmt *b)
{ {
COMPARE_NODE_FIELD(opfamilyname); COMPARE_NODE_FIELD(opfamilyname);
COMPARE_STRING_FIELD(amname); COMPARE_STRING_FIELD(amname);
@ -1219,7 +1219,7 @@ _equalCompositeTypeStmt(CompositeTypeStmt *a, CompositeTypeStmt *b)
} }
static bool static bool
_equalCreateEnumStmt(CreateEnumStmt * a, CreateEnumStmt * b) _equalCreateEnumStmt(CreateEnumStmt *a, CreateEnumStmt *b)
{ {
COMPARE_NODE_FIELD(typename); COMPARE_NODE_FIELD(typename);
COMPARE_NODE_FIELD(vals); COMPARE_NODE_FIELD(vals);
@ -1284,7 +1284,7 @@ _equalCreateOpClassItem(CreateOpClassItem *a, CreateOpClassItem *b)
} }
static bool static bool
_equalCreateOpFamilyStmt(CreateOpFamilyStmt * a, CreateOpFamilyStmt * b) _equalCreateOpFamilyStmt(CreateOpFamilyStmt *a, CreateOpFamilyStmt *b)
{ {
COMPARE_NODE_FIELD(opfamilyname); COMPARE_NODE_FIELD(opfamilyname);
COMPARE_STRING_FIELD(amname); COMPARE_STRING_FIELD(amname);
@ -1293,7 +1293,7 @@ _equalCreateOpFamilyStmt(CreateOpFamilyStmt * a, CreateOpFamilyStmt * b)
} }
static bool static bool
_equalAlterOpFamilyStmt(AlterOpFamilyStmt * a, AlterOpFamilyStmt * b) _equalAlterOpFamilyStmt(AlterOpFamilyStmt *a, AlterOpFamilyStmt *b)
{ {
COMPARE_NODE_FIELD(opfamilyname); COMPARE_NODE_FIELD(opfamilyname);
COMPARE_STRING_FIELD(amname); COMPARE_STRING_FIELD(amname);
@ -1401,7 +1401,7 @@ _equalVariableShowStmt(VariableShowStmt *a, VariableShowStmt *b)
} }
static bool static bool
_equalDiscardStmt(DiscardStmt * a, DiscardStmt * b) _equalDiscardStmt(DiscardStmt *a, DiscardStmt *b)
{ {
COMPARE_SCALAR_FIELD(target); COMPARE_SCALAR_FIELD(target);
@ -1893,7 +1893,7 @@ _equalFkConstraint(FkConstraint *a, FkConstraint *b)
} }
static bool static bool
_equalXmlSerialize(XmlSerialize * a, XmlSerialize * b) _equalXmlSerialize(XmlSerialize *a, XmlSerialize *b)
{ {
COMPARE_SCALAR_FIELD(xmloption); COMPARE_SCALAR_FIELD(xmloption);
COMPARE_NODE_FIELD(expr); COMPARE_NODE_FIELD(expr);

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.317 2007/11/15 21:14:35 momjian Exp $ * $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.318 2007/11/15 22:25:15 momjian Exp $
* *
* NOTES * NOTES
* Every node type that can appear in stored rules' parsetrees *must* * Every node type that can appear in stored rules' parsetrees *must*
@ -235,7 +235,7 @@ _outDatum(StringInfo str, Datum value, int typlen, bool typbyval)
*/ */
static void static void
_outPlannedStmt(StringInfo str, PlannedStmt * node) _outPlannedStmt(StringInfo str, PlannedStmt *node)
{ {
WRITE_NODE_TYPE("PLANNEDSTMT"); WRITE_NODE_TYPE("PLANNEDSTMT");
@ -656,7 +656,7 @@ _outRangeVar(StringInfo str, RangeVar *node)
} }
static void static void
_outIntoClause(StringInfo str, IntoClause * node) _outIntoClause(StringInfo str, IntoClause *node)
{ {
WRITE_NODE_TYPE("INTOCLAUSE"); WRITE_NODE_TYPE("INTOCLAUSE");
@ -872,7 +872,7 @@ _outRelabelType(StringInfo str, RelabelType *node)
} }
static void static void
_outCoerceViaIO(StringInfo str, CoerceViaIO * node) _outCoerceViaIO(StringInfo str, CoerceViaIO *node)
{ {
WRITE_NODE_TYPE("COERCEVIAIO"); WRITE_NODE_TYPE("COERCEVIAIO");
@ -882,7 +882,7 @@ _outCoerceViaIO(StringInfo str, CoerceViaIO * node)
} }
static void static void
_outArrayCoerceExpr(StringInfo str, ArrayCoerceExpr * node) _outArrayCoerceExpr(StringInfo str, ArrayCoerceExpr *node)
{ {
WRITE_NODE_TYPE("ARRAYCOERCEEXPR"); WRITE_NODE_TYPE("ARRAYCOERCEEXPR");
@ -986,7 +986,7 @@ _outMinMaxExpr(StringInfo str, MinMaxExpr *node)
} }
static void static void
_outXmlExpr(StringInfo str, XmlExpr * node) _outXmlExpr(StringInfo str, XmlExpr *node)
{ {
WRITE_NODE_TYPE("XMLEXPR"); WRITE_NODE_TYPE("XMLEXPR");
@ -1060,7 +1060,7 @@ _outSetToDefault(StringInfo str, SetToDefault *node)
} }
static void static void
_outCurrentOfExpr(StringInfo str, CurrentOfExpr * node) _outCurrentOfExpr(StringInfo str, CurrentOfExpr *node)
{ {
WRITE_NODE_TYPE("CURRENTOFEXPR"); WRITE_NODE_TYPE("CURRENTOFEXPR");
@ -1291,7 +1291,7 @@ _outHashPath(StringInfo str, HashPath *node)
} }
static void static void
_outPlannerGlobal(StringInfo str, PlannerGlobal * node) _outPlannerGlobal(StringInfo str, PlannerGlobal *node)
{ {
WRITE_NODE_TYPE("PLANNERGLOBAL"); WRITE_NODE_TYPE("PLANNERGLOBAL");
@ -1385,7 +1385,7 @@ _outIndexOptInfo(StringInfo str, IndexOptInfo *node)
} }
static void static void
_outEquivalenceClass(StringInfo str, EquivalenceClass * node) _outEquivalenceClass(StringInfo str, EquivalenceClass *node)
{ {
/* /*
* To simplify reading, we just chase up to the topmost merged EC and * To simplify reading, we just chase up to the topmost merged EC and
@ -1409,7 +1409,7 @@ _outEquivalenceClass(StringInfo str, EquivalenceClass * node)
} }
static void static void
_outEquivalenceMember(StringInfo str, EquivalenceMember * node) _outEquivalenceMember(StringInfo str, EquivalenceMember *node)
{ {
WRITE_NODE_TYPE("EQUIVALENCEMEMBER"); WRITE_NODE_TYPE("EQUIVALENCEMEMBER");
@ -1421,7 +1421,7 @@ _outEquivalenceMember(StringInfo str, EquivalenceMember * node)
} }
static void static void
_outPathKey(StringInfo str, PathKey * node) _outPathKey(StringInfo str, PathKey *node)
{ {
WRITE_NODE_TYPE("PATHKEY"); WRITE_NODE_TYPE("PATHKEY");
@ -1627,7 +1627,7 @@ _outLockingClause(StringInfo str, LockingClause *node)
} }
static void static void
_outXmlSerialize(StringInfo str, XmlSerialize * node) _outXmlSerialize(StringInfo str, XmlSerialize *node)
{ {
WRITE_NODE_TYPE("XMLSERIALIZE"); WRITE_NODE_TYPE("XMLSERIALIZE");

View File

@ -54,7 +54,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/optimizer/path/costsize.c,v 1.188 2007/11/15 21:14:35 momjian Exp $ * $PostgreSQL: pgsql/src/backend/optimizer/path/costsize.c,v 1.189 2007/11/15 22:25:15 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -112,12 +112,12 @@ typedef struct
{ {
PlannerInfo *root; PlannerInfo *root;
QualCost total; QualCost total;
} cost_qual_eval_context; } cost_qual_eval_context;
static MergeScanSelCache *cached_scansel(PlannerInfo *root, static MergeScanSelCache *cached_scansel(PlannerInfo *root,
RestrictInfo *rinfo, RestrictInfo *rinfo,
PathKey * pathkey); PathKey *pathkey);
static bool cost_qual_eval_walker(Node *node, cost_qual_eval_context * context); static bool cost_qual_eval_walker(Node *node, cost_qual_eval_context *context);
static Selectivity approx_selectivity(PlannerInfo *root, List *quals, static Selectivity approx_selectivity(PlannerInfo *root, List *quals,
JoinType jointype); JoinType jointype);
static Selectivity join_in_selectivity(JoinPath *path, PlannerInfo *root); static Selectivity join_in_selectivity(JoinPath *path, PlannerInfo *root);
@ -1593,7 +1593,7 @@ cost_mergejoin(MergePath *path, PlannerInfo *root)
* run mergejoinscansel() with caching * run mergejoinscansel() with caching
*/ */
static MergeScanSelCache * static MergeScanSelCache *
cached_scansel(PlannerInfo *root, RestrictInfo *rinfo, PathKey * pathkey) cached_scansel(PlannerInfo *root, RestrictInfo *rinfo, PathKey *pathkey)
{ {
MergeScanSelCache *cache; MergeScanSelCache *cache;
ListCell *lc; ListCell *lc;
@ -1891,7 +1891,7 @@ cost_qual_eval_node(QualCost *cost, Node *qual, PlannerInfo *root)
} }
static bool static bool
cost_qual_eval_walker(Node *node, cost_qual_eval_context * context) cost_qual_eval_walker(Node *node, cost_qual_eval_context *context)
{ {
if (node == NULL) if (node == NULL)
return false; return false;

View File

@ -10,7 +10,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/optimizer/path/equivclass.c,v 1.5 2007/11/15 21:14:35 momjian Exp $ * $PostgreSQL: pgsql/src/backend/optimizer/path/equivclass.c,v 1.6 2007/11/15 22:25:15 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -26,32 +26,32 @@
#include "utils/lsyscache.h" #include "utils/lsyscache.h"
static EquivalenceMember *add_eq_member(EquivalenceClass * ec, static EquivalenceMember *add_eq_member(EquivalenceClass *ec,
Expr *expr, Relids relids, Expr *expr, Relids relids,
bool is_child, Oid datatype); bool is_child, Oid datatype);
static void generate_base_implied_equalities_const(PlannerInfo *root, static void generate_base_implied_equalities_const(PlannerInfo *root,
EquivalenceClass * ec); EquivalenceClass *ec);
static void generate_base_implied_equalities_no_const(PlannerInfo *root, static void generate_base_implied_equalities_no_const(PlannerInfo *root,
EquivalenceClass * ec); EquivalenceClass *ec);
static void generate_base_implied_equalities_broken(PlannerInfo *root, static void generate_base_implied_equalities_broken(PlannerInfo *root,
EquivalenceClass * ec); EquivalenceClass *ec);
static List *generate_join_implied_equalities_normal(PlannerInfo *root, static List *generate_join_implied_equalities_normal(PlannerInfo *root,
EquivalenceClass * ec, EquivalenceClass *ec,
RelOptInfo *joinrel, RelOptInfo *joinrel,
RelOptInfo *outer_rel, RelOptInfo *outer_rel,
RelOptInfo *inner_rel); RelOptInfo *inner_rel);
static List *generate_join_implied_equalities_broken(PlannerInfo *root, static List *generate_join_implied_equalities_broken(PlannerInfo *root,
EquivalenceClass * ec, EquivalenceClass *ec,
RelOptInfo *joinrel, RelOptInfo *joinrel,
RelOptInfo *outer_rel, RelOptInfo *outer_rel,
RelOptInfo *inner_rel); RelOptInfo *inner_rel);
static Oid select_equality_operator(EquivalenceClass * ec, static Oid select_equality_operator(EquivalenceClass *ec,
Oid lefttype, Oid righttype); Oid lefttype, Oid righttype);
static RestrictInfo *create_join_clause(PlannerInfo *root, static RestrictInfo *create_join_clause(PlannerInfo *root,
EquivalenceClass * ec, Oid opno, EquivalenceClass *ec, Oid opno,
EquivalenceMember * leftem, EquivalenceMember *leftem,
EquivalenceMember * rightem, EquivalenceMember *rightem,
EquivalenceClass * parent_ec); EquivalenceClass *parent_ec);
static void reconsider_outer_join_clause(PlannerInfo *root, static void reconsider_outer_join_clause(PlannerInfo *root,
RestrictInfo *rinfo, RestrictInfo *rinfo,
bool outer_on_left); bool outer_on_left);
@ -313,7 +313,7 @@ process_equivalence(PlannerInfo *root, RestrictInfo *restrictinfo,
* add_eq_member - build a new EquivalenceMember and add it to an EC * add_eq_member - build a new EquivalenceMember and add it to an EC
*/ */
static EquivalenceMember * static EquivalenceMember *
add_eq_member(EquivalenceClass * ec, Expr *expr, Relids relids, add_eq_member(EquivalenceClass *ec, Expr *expr, Relids relids,
bool is_child, Oid datatype) bool is_child, Oid datatype)
{ {
EquivalenceMember *em = makeNode(EquivalenceMember); EquivalenceMember *em = makeNode(EquivalenceMember);
@ -554,7 +554,7 @@ generate_base_implied_equalities(PlannerInfo *root)
*/ */
static void static void
generate_base_implied_equalities_const(PlannerInfo *root, generate_base_implied_equalities_const(PlannerInfo *root,
EquivalenceClass * ec) EquivalenceClass *ec)
{ {
EquivalenceMember *const_em = NULL; EquivalenceMember *const_em = NULL;
ListCell *lc; ListCell *lc;
@ -603,7 +603,7 @@ generate_base_implied_equalities_const(PlannerInfo *root,
*/ */
static void static void
generate_base_implied_equalities_no_const(PlannerInfo *root, generate_base_implied_equalities_no_const(PlannerInfo *root,
EquivalenceClass * ec) EquivalenceClass *ec)
{ {
EquivalenceMember **prev_ems; EquivalenceMember **prev_ems;
ListCell *lc; ListCell *lc;
@ -685,7 +685,7 @@ generate_base_implied_equalities_no_const(PlannerInfo *root,
*/ */
static void static void
generate_base_implied_equalities_broken(PlannerInfo *root, generate_base_implied_equalities_broken(PlannerInfo *root,
EquivalenceClass * ec) EquivalenceClass *ec)
{ {
ListCell *lc; ListCell *lc;
@ -775,7 +775,7 @@ generate_join_implied_equalities(PlannerInfo *root,
*/ */
static List * static List *
generate_join_implied_equalities_normal(PlannerInfo *root, generate_join_implied_equalities_normal(PlannerInfo *root,
EquivalenceClass * ec, EquivalenceClass *ec,
RelOptInfo *joinrel, RelOptInfo *joinrel,
RelOptInfo *outer_rel, RelOptInfo *outer_rel,
RelOptInfo *inner_rel) RelOptInfo *inner_rel)
@ -944,7 +944,7 @@ generate_join_implied_equalities_normal(PlannerInfo *root,
*/ */
static List * static List *
generate_join_implied_equalities_broken(PlannerInfo *root, generate_join_implied_equalities_broken(PlannerInfo *root,
EquivalenceClass * ec, EquivalenceClass *ec,
RelOptInfo *joinrel, RelOptInfo *joinrel,
RelOptInfo *outer_rel, RelOptInfo *outer_rel,
RelOptInfo *inner_rel) RelOptInfo *inner_rel)
@ -973,7 +973,7 @@ generate_join_implied_equalities_broken(PlannerInfo *root,
* Returns InvalidOid if no operator can be found for this datatype combination * Returns InvalidOid if no operator can be found for this datatype combination
*/ */
static Oid static Oid
select_equality_operator(EquivalenceClass * ec, Oid lefttype, Oid righttype) select_equality_operator(EquivalenceClass *ec, Oid lefttype, Oid righttype)
{ {
ListCell *lc; ListCell *lc;
@ -1003,10 +1003,10 @@ select_equality_operator(EquivalenceClass * ec, Oid lefttype, Oid righttype)
*/ */
static RestrictInfo * static RestrictInfo *
create_join_clause(PlannerInfo *root, create_join_clause(PlannerInfo *root,
EquivalenceClass * ec, Oid opno, EquivalenceClass *ec, Oid opno,
EquivalenceMember * leftem, EquivalenceMember *leftem,
EquivalenceMember * rightem, EquivalenceMember *rightem,
EquivalenceClass * parent_ec) EquivalenceClass *parent_ec)
{ {
RestrictInfo *rinfo; RestrictInfo *rinfo;
ListCell *lc; ListCell *lc;
@ -1553,8 +1553,8 @@ find_eclass_clauses_for_index_join(PlannerInfo *root, RelOptInfo *rel,
/* /*
* Found one, so try to generate a join clause. This is like * Found one, so try to generate a join clause. This is like
* generate_join_implied_equalities_normal, except simpler since * generate_join_implied_equalities_normal, except simpler since
* our only preference item is to pick a Var on the outer side. * our only preference item is to pick a Var on the outer side. We
* We only need one join clause per index col. * only need one join clause per index col.
*/ */
foreach(lc3, cur_ec->ec_members) foreach(lc3, cur_ec->ec_members)
{ {
@ -1750,7 +1750,7 @@ has_relevant_eclass_joinclause(PlannerInfo *root, RelOptInfo *rel1)
* from actually being generated. * from actually being generated.
*/ */
bool bool
eclass_useful_for_merging(EquivalenceClass * eclass, eclass_useful_for_merging(EquivalenceClass *eclass,
RelOptInfo *rel) RelOptInfo *rel)
{ {
ListCell *lc; ListCell *lc;

View File

@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/optimizer/path/indxpath.c,v 1.224 2007/11/15 21:14:35 momjian Exp $ * $PostgreSQL: pgsql/src/backend/optimizer/path/indxpath.c,v 1.225 2007/11/15 22:25:15 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -52,7 +52,7 @@ typedef struct
List *quals; /* the WHERE clauses it uses */ List *quals; /* the WHERE clauses it uses */
List *preds; /* predicates of its partial index(es) */ List *preds; /* predicates of its partial index(es) */
Bitmapset *clauseids; /* quals+preds represented as a bitmapset */ Bitmapset *clauseids; /* quals+preds represented as a bitmapset */
} PathClauseUsage; } PathClauseUsage;
static List *find_usable_indexes(PlannerInfo *root, RelOptInfo *rel, static List *find_usable_indexes(PlannerInfo *root, RelOptInfo *rel,
@ -774,8 +774,8 @@ choose_bitmap_and(PlannerInfo *root, RelOptInfo *rel,
static int static int
path_usage_comparator(const void *a, const void *b) path_usage_comparator(const void *a, const void *b)
{ {
PathClauseUsage *pa = *(PathClauseUsage * const *) a; PathClauseUsage *pa = *(PathClauseUsage *const *) a;
PathClauseUsage *pb = *(PathClauseUsage * const *) b; PathClauseUsage *pb = *(PathClauseUsage *const *) b;
Cost acost; Cost acost;
Cost bcost; Cost bcost;
Selectivity aselec; Selectivity aselec;
@ -1569,7 +1569,7 @@ matches_any_index(RestrictInfo *rinfo, RelOptInfo *rel, Relids outer_relids)
* This is also exported for use by find_eclass_clauses_for_index_join. * This is also exported for use by find_eclass_clauses_for_index_join.
*/ */
bool bool
eclass_matches_any_index(EquivalenceClass * ec, EquivalenceMember * em, eclass_matches_any_index(EquivalenceClass *ec, EquivalenceMember *em,
RelOptInfo *rel) RelOptInfo *rel)
{ {
ListCell *l; ListCell *l;

View File

@ -11,7 +11,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/optimizer/path/pathkeys.c,v 1.90 2007/11/15 21:14:36 momjian Exp $ * $PostgreSQL: pgsql/src/backend/optimizer/path/pathkeys.c,v 1.91 2007/11/15 22:25:15 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -37,12 +37,12 @@
#define MUST_BE_REDUNDANT(eclass) \ #define MUST_BE_REDUNDANT(eclass) \
((eclass)->ec_has_const && !(eclass)->ec_below_outer_join) ((eclass)->ec_has_const && !(eclass)->ec_below_outer_join)
static PathKey *makePathKey(EquivalenceClass * eclass, Oid opfamily, static PathKey *makePathKey(EquivalenceClass *eclass, Oid opfamily,
int strategy, bool nulls_first); int strategy, bool nulls_first);
static PathKey *make_canonical_pathkey(PlannerInfo *root, static PathKey *make_canonical_pathkey(PlannerInfo *root,
EquivalenceClass * eclass, Oid opfamily, EquivalenceClass *eclass, Oid opfamily,
int strategy, bool nulls_first); int strategy, bool nulls_first);
static bool pathkey_is_redundant(PathKey * new_pathkey, List *pathkeys); static bool pathkey_is_redundant(PathKey *new_pathkey, List *pathkeys);
static PathKey *make_pathkey_from_sortinfo(PlannerInfo *root, static PathKey *make_pathkey_from_sortinfo(PlannerInfo *root,
Expr *expr, Oid ordering_op, Expr *expr, Oid ordering_op,
bool nulls_first, bool nulls_first,
@ -50,7 +50,7 @@ static PathKey *make_pathkey_from_sortinfo(PlannerInfo *root,
bool canonicalize); bool canonicalize);
static Var *find_indexkey_var(PlannerInfo *root, RelOptInfo *rel, static Var *find_indexkey_var(PlannerInfo *root, RelOptInfo *rel,
AttrNumber varattno); AttrNumber varattno);
static bool right_merge_direction(PlannerInfo *root, PathKey * pathkey); static bool right_merge_direction(PlannerInfo *root, PathKey *pathkey);
/**************************************************************************** /****************************************************************************
@ -65,7 +65,7 @@ static bool right_merge_direction(PlannerInfo *root, PathKey * pathkey);
* convenience routine to build the specified node. * convenience routine to build the specified node.
*/ */
static PathKey * static PathKey *
makePathKey(EquivalenceClass * eclass, Oid opfamily, makePathKey(EquivalenceClass *eclass, Oid opfamily,
int strategy, bool nulls_first) int strategy, bool nulls_first)
{ {
PathKey *pk = makeNode(PathKey); PathKey *pk = makeNode(PathKey);
@ -89,7 +89,7 @@ makePathKey(EquivalenceClass * eclass, Oid opfamily,
*/ */
static PathKey * static PathKey *
make_canonical_pathkey(PlannerInfo *root, make_canonical_pathkey(PlannerInfo *root,
EquivalenceClass * eclass, Oid opfamily, EquivalenceClass *eclass, Oid opfamily,
int strategy, bool nulls_first) int strategy, bool nulls_first)
{ {
PathKey *pk; PathKey *pk;
@ -155,7 +155,7 @@ make_canonical_pathkey(PlannerInfo *root,
* pointer comparison is enough to decide whether canonical ECs are the same. * pointer comparison is enough to decide whether canonical ECs are the same.
*/ */
static bool static bool
pathkey_is_redundant(PathKey * new_pathkey, List *pathkeys) pathkey_is_redundant(PathKey *new_pathkey, List *pathkeys)
{ {
EquivalenceClass *new_ec = new_pathkey->pk_eclass; EquivalenceClass *new_ec = new_pathkey->pk_eclass;
ListCell *lc; ListCell *lc;
@ -1392,7 +1392,7 @@ pathkeys_useful_for_merging(PlannerInfo *root, RelOptInfo *rel, List *pathkeys)
* for merging its target column. * for merging its target column.
*/ */
static bool static bool
right_merge_direction(PlannerInfo *root, PathKey * pathkey) right_merge_direction(PlannerInfo *root, PathKey *pathkey)
{ {
ListCell *l; ListCell *l;

View File

@ -10,7 +10,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/optimizer/plan/createplan.c,v 1.235 2007/11/15 21:14:36 momjian Exp $ * $PostgreSQL: pgsql/src/backend/optimizer/plan/createplan.c,v 1.236 2007/11/15 22:25:15 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -2141,7 +2141,7 @@ order_qual_clauses(PlannerInfo *root, List *clauses)
{ {
Node *clause; Node *clause;
Cost cost; Cost cost;
} QualItem; } QualItem;
int nitems = list_length(clauses); int nitems = list_length(clauses);
QualItem *items; QualItem *items;
ListCell *lc; ListCell *lc;

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/optimizer/plan/planner.c,v 1.224 2007/11/15 21:14:36 momjian Exp $ * $PostgreSQL: pgsql/src/backend/optimizer/plan/planner.c,v 1.225 2007/11/15 22:25:15 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -229,7 +229,7 @@ standard_planner(Query *parse, int cursorOptions, ParamListInfo boundParams)
*-------------------- *--------------------
*/ */
Plan * Plan *
subquery_planner(PlannerGlobal * glob, Query *parse, subquery_planner(PlannerGlobal *glob, Query *parse,
Index level, double tuple_fraction, Index level, double tuple_fraction,
PlannerInfo **subroot) PlannerInfo **subroot)
{ {

View File

@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/optimizer/plan/setrefs.c,v 1.138 2007/11/15 21:14:36 momjian Exp $ * $PostgreSQL: pgsql/src/backend/optimizer/plan/setrefs.c,v 1.139 2007/11/15 22:25:15 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -45,7 +45,7 @@ typedef struct
{ {
PlannerGlobal *glob; PlannerGlobal *glob;
int rtoffset; int rtoffset;
} fix_scan_expr_context; } fix_scan_expr_context;
typedef struct typedef struct
{ {
@ -54,29 +54,29 @@ typedef struct
indexed_tlist *inner_itlist; indexed_tlist *inner_itlist;
Index acceptable_rel; Index acceptable_rel;
int rtoffset; int rtoffset;
} fix_join_expr_context; } fix_join_expr_context;
typedef struct typedef struct
{ {
PlannerGlobal *glob; PlannerGlobal *glob;
indexed_tlist *subplan_itlist; indexed_tlist *subplan_itlist;
int rtoffset; int rtoffset;
} fix_upper_expr_context; } fix_upper_expr_context;
#define fix_scan_list(glob, lst, rtoffset) \ #define fix_scan_list(glob, lst, rtoffset) \
((List *) fix_scan_expr(glob, (Node *) (lst), rtoffset)) ((List *) fix_scan_expr(glob, (Node *) (lst), rtoffset))
static Plan *set_plan_refs(PlannerGlobal * glob, Plan *plan, int rtoffset); static Plan *set_plan_refs(PlannerGlobal *glob, Plan *plan, int rtoffset);
static Plan *set_subqueryscan_references(PlannerGlobal * glob, static Plan *set_subqueryscan_references(PlannerGlobal *glob,
SubqueryScan *plan, SubqueryScan *plan,
int rtoffset); int rtoffset);
static bool trivial_subqueryscan(SubqueryScan *plan); static bool trivial_subqueryscan(SubqueryScan *plan);
static Node *fix_scan_expr(PlannerGlobal * glob, Node *node, int rtoffset); static Node *fix_scan_expr(PlannerGlobal *glob, Node *node, int rtoffset);
static Node *fix_scan_expr_mutator(Node *node, fix_scan_expr_context * context); static Node *fix_scan_expr_mutator(Node *node, fix_scan_expr_context *context);
static void set_join_references(PlannerGlobal * glob, Join *join, int rtoffset); static void set_join_references(PlannerGlobal *glob, Join *join, int rtoffset);
static void set_inner_join_references(PlannerGlobal * glob, Plan *inner_plan, static void set_inner_join_references(PlannerGlobal *glob, Plan *inner_plan,
indexed_tlist *outer_itlist); indexed_tlist *outer_itlist);
static void set_upper_references(PlannerGlobal * glob, Plan *plan, int rtoffset); static void set_upper_references(PlannerGlobal *glob, Plan *plan, int rtoffset);
static void set_dummy_tlist_references(Plan *plan, int rtoffset); static void set_dummy_tlist_references(Plan *plan, int rtoffset);
static indexed_tlist *build_tlist_index(List *tlist); static indexed_tlist *build_tlist_index(List *tlist);
static Var *search_indexed_tlist_for_var(Var *var, static Var *search_indexed_tlist_for_var(Var *var,
@ -86,19 +86,19 @@ static Var *search_indexed_tlist_for_var(Var *var,
static Var *search_indexed_tlist_for_non_var(Node *node, static Var *search_indexed_tlist_for_non_var(Node *node,
indexed_tlist *itlist, indexed_tlist *itlist,
Index newvarno); Index newvarno);
static List *fix_join_expr(PlannerGlobal * glob, static List *fix_join_expr(PlannerGlobal *glob,
List *clauses, List *clauses,
indexed_tlist *outer_itlist, indexed_tlist *outer_itlist,
indexed_tlist *inner_itlist, indexed_tlist *inner_itlist,
Index acceptable_rel, int rtoffset); Index acceptable_rel, int rtoffset);
static Node *fix_join_expr_mutator(Node *node, static Node *fix_join_expr_mutator(Node *node,
fix_join_expr_context * context); fix_join_expr_context *context);
static Node *fix_upper_expr(PlannerGlobal * glob, static Node *fix_upper_expr(PlannerGlobal *glob,
Node *node, Node *node,
indexed_tlist *subplan_itlist, indexed_tlist *subplan_itlist,
int rtoffset); int rtoffset);
static Node *fix_upper_expr_mutator(Node *node, static Node *fix_upper_expr_mutator(Node *node,
fix_upper_expr_context * context); fix_upper_expr_context *context);
static bool fix_opfuncids_walker(Node *node, void *context); static bool fix_opfuncids_walker(Node *node, void *context);
@ -160,7 +160,7 @@ static bool fix_opfuncids_walker(Node *node, void *context);
* it's not so safe to assume that for expression tree nodes. * it's not so safe to assume that for expression tree nodes.
*/ */
Plan * Plan *
set_plan_references(PlannerGlobal * glob, Plan *plan, List *rtable) set_plan_references(PlannerGlobal *glob, Plan *plan, List *rtable)
{ {
int rtoffset = list_length(glob->finalrtable); int rtoffset = list_length(glob->finalrtable);
ListCell *lc; ListCell *lc;
@ -215,7 +215,7 @@ set_plan_references(PlannerGlobal * glob, Plan *plan, List *rtable)
* set_plan_refs: recurse through the Plan nodes of a single subquery level * set_plan_refs: recurse through the Plan nodes of a single subquery level
*/ */
static Plan * static Plan *
set_plan_refs(PlannerGlobal * glob, Plan *plan, int rtoffset) set_plan_refs(PlannerGlobal *glob, Plan *plan, int rtoffset)
{ {
ListCell *l; ListCell *l;
@ -473,7 +473,7 @@ set_plan_refs(PlannerGlobal * glob, Plan *plan, int rtoffset)
* to do the normal processing on it. * to do the normal processing on it.
*/ */
static Plan * static Plan *
set_subqueryscan_references(PlannerGlobal * glob, set_subqueryscan_references(PlannerGlobal *glob,
SubqueryScan *plan, SubqueryScan *plan,
int rtoffset) int rtoffset)
{ {
@ -619,7 +619,7 @@ copyVar(Var *var)
* and adding OIDs from regclass Const nodes into glob->relationOids. * and adding OIDs from regclass Const nodes into glob->relationOids.
*/ */
static Node * static Node *
fix_scan_expr(PlannerGlobal * glob, Node *node, int rtoffset) fix_scan_expr(PlannerGlobal *glob, Node *node, int rtoffset)
{ {
fix_scan_expr_context context; fix_scan_expr_context context;
@ -629,7 +629,7 @@ fix_scan_expr(PlannerGlobal * glob, Node *node, int rtoffset)
} }
static Node * static Node *
fix_scan_expr_mutator(Node *node, fix_scan_expr_context * context) fix_scan_expr_mutator(Node *node, fix_scan_expr_context *context)
{ {
if (node == NULL) if (node == NULL)
return NULL; return NULL;
@ -700,7 +700,7 @@ fix_scan_expr_mutator(Node *node, fix_scan_expr_context * context)
* quals of the child indexscan. set_inner_join_references does that. * quals of the child indexscan. set_inner_join_references does that.
*/ */
static void static void
set_join_references(PlannerGlobal * glob, Join *join, int rtoffset) set_join_references(PlannerGlobal *glob, Join *join, int rtoffset)
{ {
Plan *outer_plan = join->plan.lefttree; Plan *outer_plan = join->plan.lefttree;
Plan *inner_plan = join->plan.righttree; Plan *inner_plan = join->plan.righttree;
@ -777,7 +777,7 @@ set_join_references(PlannerGlobal * glob, Join *join, int rtoffset)
* recursion reaches the inner indexscan, and so we'd have done it twice. * recursion reaches the inner indexscan, and so we'd have done it twice.
*/ */
static void static void
set_inner_join_references(PlannerGlobal * glob, Plan *inner_plan, set_inner_join_references(PlannerGlobal *glob, Plan *inner_plan,
indexed_tlist *outer_itlist) indexed_tlist *outer_itlist)
{ {
if (IsA(inner_plan, IndexScan)) if (IsA(inner_plan, IndexScan))
@ -969,7 +969,7 @@ set_inner_join_references(PlannerGlobal * glob, Plan *inner_plan,
* the expression. * the expression.
*/ */
static void static void
set_upper_references(PlannerGlobal * glob, Plan *plan, int rtoffset) set_upper_references(PlannerGlobal *glob, Plan *plan, int rtoffset)
{ {
Plan *subplan = plan->lefttree; Plan *subplan = plan->lefttree;
indexed_tlist *subplan_itlist; indexed_tlist *subplan_itlist;
@ -1254,7 +1254,7 @@ search_indexed_tlist_for_non_var(Node *node,
* not modified. * not modified.
*/ */
static List * static List *
fix_join_expr(PlannerGlobal * glob, fix_join_expr(PlannerGlobal *glob,
List *clauses, List *clauses,
indexed_tlist *outer_itlist, indexed_tlist *outer_itlist,
indexed_tlist *inner_itlist, indexed_tlist *inner_itlist,
@ -1272,7 +1272,7 @@ fix_join_expr(PlannerGlobal * glob,
} }
static Node * static Node *
fix_join_expr_mutator(Node *node, fix_join_expr_context * context) fix_join_expr_mutator(Node *node, fix_join_expr_context *context)
{ {
Var *newvar; Var *newvar;
@ -1385,7 +1385,7 @@ fix_join_expr_mutator(Node *node, fix_join_expr_context * context)
* The original tree is not modified. * The original tree is not modified.
*/ */
static Node * static Node *
fix_upper_expr(PlannerGlobal * glob, fix_upper_expr(PlannerGlobal *glob,
Node *node, Node *node,
indexed_tlist *subplan_itlist, indexed_tlist *subplan_itlist,
int rtoffset) int rtoffset)
@ -1399,7 +1399,7 @@ fix_upper_expr(PlannerGlobal * glob,
} }
static Node * static Node *
fix_upper_expr_mutator(Node *node, fix_upper_expr_context * context) fix_upper_expr_mutator(Node *node, fix_upper_expr_context *context)
{ {
Var *newvar; Var *newvar;
@ -1479,7 +1479,7 @@ fix_upper_expr_mutator(Node *node, fix_upper_expr_context * context)
* they are not coming from a subplan. * they are not coming from a subplan.
*/ */
List * List *
set_returning_clause_references(PlannerGlobal * glob, set_returning_clause_references(PlannerGlobal *glob,
List *rlist, List *rlist,
Plan *topplan, Plan *topplan,
Index resultRelation) Index resultRelation)

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/optimizer/plan/subselect.c,v 1.126 2007/11/15 21:14:36 momjian Exp $ * $PostgreSQL: pgsql/src/backend/optimizer/plan/subselect.c,v 1.127 2007/11/15 22:25:15 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -43,7 +43,7 @@ typedef struct process_sublinks_context
{ {
PlannerInfo *root; PlannerInfo *root;
bool isTopQual; bool isTopQual;
} process_sublinks_context; } process_sublinks_context;
typedef struct finalize_primnode_context typedef struct finalize_primnode_context
{ {
@ -63,7 +63,7 @@ static bool subplan_is_hashable(SubLink *slink, SubPlan *node, Plan *plan);
static bool hash_ok_operator(OpExpr *expr); static bool hash_ok_operator(OpExpr *expr);
static Node *replace_correlation_vars_mutator(Node *node, PlannerInfo *root); static Node *replace_correlation_vars_mutator(Node *node, PlannerInfo *root);
static Node *process_sublinks_mutator(Node *node, static Node *process_sublinks_mutator(Node *node,
process_sublinks_context * context); process_sublinks_context *context);
static Bitmapset *finalize_plan(PlannerInfo *root, static Bitmapset *finalize_plan(PlannerInfo *root,
Plan *plan, Plan *plan,
Bitmapset *outer_params, Bitmapset *outer_params,
@ -865,7 +865,7 @@ SS_process_sublinks(PlannerInfo *root, Node *expr, bool isQual)
} }
static Node * static Node *
process_sublinks_mutator(Node *node, process_sublinks_context * context) process_sublinks_mutator(Node *node, process_sublinks_context *context)
{ {
process_sublinks_context locContext; process_sublinks_context locContext;

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/parser/parse_expr.c,v 1.224 2007/11/15 21:14:37 momjian Exp $ * $PostgreSQL: pgsql/src/backend/parser/parse_expr.c,v 1.225 2007/11/15 22:25:15 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -56,10 +56,10 @@ static Node *transformArrayExpr(ParseState *pstate, ArrayExpr *a);
static Node *transformRowExpr(ParseState *pstate, RowExpr *r); static Node *transformRowExpr(ParseState *pstate, RowExpr *r);
static Node *transformCoalesceExpr(ParseState *pstate, CoalesceExpr *c); static Node *transformCoalesceExpr(ParseState *pstate, CoalesceExpr *c);
static Node *transformMinMaxExpr(ParseState *pstate, MinMaxExpr *m); static Node *transformMinMaxExpr(ParseState *pstate, MinMaxExpr *m);
static Node *transformXmlExpr(ParseState *pstate, XmlExpr * x); static Node *transformXmlExpr(ParseState *pstate, XmlExpr *x);
static Node *transformXmlSerialize(ParseState *pstate, XmlSerialize * xs); static Node *transformXmlSerialize(ParseState *pstate, XmlSerialize *xs);
static Node *transformBooleanTest(ParseState *pstate, BooleanTest *b); static Node *transformBooleanTest(ParseState *pstate, BooleanTest *b);
static Node *transformCurrentOfExpr(ParseState *pstate, CurrentOfExpr * cexpr); static Node *transformCurrentOfExpr(ParseState *pstate, CurrentOfExpr *cexpr);
static Node *transformColumnRef(ParseState *pstate, ColumnRef *cref); static Node *transformColumnRef(ParseState *pstate, ColumnRef *cref);
static Node *transformWholeRowRef(ParseState *pstate, char *schemaname, static Node *transformWholeRowRef(ParseState *pstate, char *schemaname,
char *relname, int location); char *relname, int location);
@ -1411,7 +1411,7 @@ transformMinMaxExpr(ParseState *pstate, MinMaxExpr *m)
} }
static Node * static Node *
transformXmlExpr(ParseState *pstate, XmlExpr * x) transformXmlExpr(ParseState *pstate, XmlExpr *x)
{ {
XmlExpr *newx = makeNode(XmlExpr); XmlExpr *newx = makeNode(XmlExpr);
ListCell *lc; ListCell *lc;
@ -1537,7 +1537,7 @@ transformXmlExpr(ParseState *pstate, XmlExpr * x)
} }
static Node * static Node *
transformXmlSerialize(ParseState *pstate, XmlSerialize * xs) transformXmlSerialize(ParseState *pstate, XmlSerialize *xs)
{ {
Oid targetType; Oid targetType;
int32 targetTypmod; int32 targetTypmod;
@ -1608,7 +1608,7 @@ transformBooleanTest(ParseState *pstate, BooleanTest *b)
} }
static Node * static Node *
transformCurrentOfExpr(ParseState *pstate, CurrentOfExpr * cexpr) transformCurrentOfExpr(ParseState *pstate, CurrentOfExpr *cexpr)
{ {
int sublevels_up; int sublevels_up;

View File

@ -4,7 +4,7 @@
* If dlopen() is available (Darwin 10.3 and later), we just use it. * If dlopen() is available (Darwin 10.3 and later), we just use it.
* Otherwise we emulate it with the older, now deprecated, NSLinkModule API. * Otherwise we emulate it with the older, now deprecated, NSLinkModule API.
* *
* $PostgreSQL: pgsql/src/backend/port/dynloader/darwin.c,v 1.12 2007/11/15 21:14:37 momjian Exp $ * $PostgreSQL: pgsql/src/backend/port/dynloader/darwin.c,v 1.13 2007/11/15 22:25:15 momjian Exp $
*/ */
#include "postgres.h" #include "postgres.h"
@ -75,13 +75,14 @@ pg_dlclose(void *handle)
PGFunction PGFunction
pg_dlsym(void *handle, char *funcname) pg_dlsym(void *handle, char *funcname)
{ {
NSSymbol symbol; NSSymbol symbol;
char *symname = (char *) malloc(strlen(funcname) + 2); char *symname = (char *) malloc(strlen(funcname) + 2);
sprintf(symname, "_%s", funcname); sprintf(symname, "_%s", funcname);
if (NSIsSymbolNameDefined(symname)) if (NSIsSymbolNameDefined(symname))
{ {
symbol = NSLookupAndBindSymbol(symname); symbol = NSLookupAndBindSymbol(symname);
free(symname); free(symname);
return (PGFunction) NSAddressOfSymbol(symbol); return (PGFunction) NSAddressOfSymbol(symbol);
} }

View File

@ -55,7 +55,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/postmaster/autovacuum.c,v 1.68 2007/11/15 21:14:37 momjian Exp $ * $PostgreSQL: pgsql/src/backend/postmaster/autovacuum.c,v 1.69 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -144,7 +144,7 @@ typedef struct avl_dbase
Oid adl_datid; /* hash key -- must be first */ Oid adl_datid; /* hash key -- must be first */
TimestampTz adl_next_worker; TimestampTz adl_next_worker;
int adl_score; int adl_score;
} avl_dbase; } avl_dbase;
/* struct to keep track of databases in worker */ /* struct to keep track of databases in worker */
typedef struct avw_dbase typedef struct avw_dbase
@ -153,14 +153,14 @@ typedef struct avw_dbase
char *adw_name; char *adw_name;
TransactionId adw_frozenxid; TransactionId adw_frozenxid;
PgStat_StatDBEntry *adw_entry; PgStat_StatDBEntry *adw_entry;
} avw_dbase; } avw_dbase;
/* struct to keep track of tables to vacuum and/or analyze, in 1st pass */ /* struct to keep track of tables to vacuum and/or analyze, in 1st pass */
typedef struct av_relation typedef struct av_relation
{ {
Oid ar_relid; Oid ar_relid;
Oid ar_toastrelid; Oid ar_toastrelid;
} av_relation; } av_relation;
/* struct to keep track of tables to vacuum and/or analyze, after rechecking */ /* struct to keep track of tables to vacuum and/or analyze, after rechecking */
typedef struct autovac_table typedef struct autovac_table
@ -202,7 +202,7 @@ typedef struct WorkerInfoData
int wi_cost_delay; int wi_cost_delay;
int wi_cost_limit; int wi_cost_limit;
int wi_cost_limit_base; int wi_cost_limit_base;
} WorkerInfoData; } WorkerInfoData;
typedef struct WorkerInfoData *WorkerInfo; typedef struct WorkerInfoData *WorkerInfo;
@ -240,7 +240,7 @@ typedef struct
SHMEM_OFFSET av_freeWorkers; SHMEM_OFFSET av_freeWorkers;
SHM_QUEUE av_runningWorkers; SHM_QUEUE av_runningWorkers;
SHMEM_OFFSET av_startingWorker; SHMEM_OFFSET av_startingWorker;
} AutoVacuumShmemStruct; } AutoVacuumShmemStruct;
static AutoVacuumShmemStruct *AutoVacuumShmem; static AutoVacuumShmemStruct *AutoVacuumShmem;
@ -2392,8 +2392,8 @@ table_recheck_autovac(Oid relid)
int vac_cost_delay; int vac_cost_delay;
/* /*
* Calculate the vacuum cost parameters and the minimum freeze age. * Calculate the vacuum cost parameters and the minimum freeze age. If
* If there is a tuple in pg_autovacuum, use it; else, use the GUC * there is a tuple in pg_autovacuum, use it; else, use the GUC
* defaults. Note that the fields may contain "-1" (or indeed any * defaults. Note that the fields may contain "-1" (or indeed any
* negative value), which means use the GUC defaults for each setting. * negative value), which means use the GUC defaults for each setting.
* In cost_limit, the value 0 also means to use the value from * In cost_limit, the value 0 also means to use the value from

View File

@ -13,7 +13,7 @@
* *
* Copyright (c) 2001-2007, PostgreSQL Global Development Group * Copyright (c) 2001-2007, PostgreSQL Global Development Group
* *
* $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.167 2007/11/15 21:14:37 momjian Exp $ * $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.168 2007/11/15 22:25:16 momjian Exp $
* ---------- * ----------
*/ */
#include "postgres.h" #include "postgres.h"
@ -134,7 +134,7 @@ typedef struct TabStatusArray
struct TabStatusArray *tsa_next; /* link to next array, if any */ struct TabStatusArray *tsa_next; /* link to next array, if any */
int tsa_used; /* # entries currently used */ int tsa_used; /* # entries currently used */
PgStat_TableStatus tsa_entries[TABSTAT_QUANTUM]; /* per-table data */ PgStat_TableStatus tsa_entries[TABSTAT_QUANTUM]; /* per-table data */
} TabStatusArray; } TabStatusArray;
static TabStatusArray *pgStatTabList = NULL; static TabStatusArray *pgStatTabList = NULL;
@ -150,7 +150,7 @@ typedef struct PgStat_SubXactStatus
int nest_level; /* subtransaction nest level */ int nest_level; /* subtransaction nest level */
struct PgStat_SubXactStatus *prev; /* higher-level subxact if any */ struct PgStat_SubXactStatus *prev; /* higher-level subxact if any */
PgStat_TableXactStatus *first; /* head of list for this subxact */ PgStat_TableXactStatus *first; /* head of list for this subxact */
} PgStat_SubXactStatus; } PgStat_SubXactStatus;
static PgStat_SubXactStatus *pgStatXactStack = NULL; static PgStat_SubXactStatus *pgStatXactStack = NULL;
@ -164,7 +164,7 @@ typedef struct TwoPhasePgStatRecord
PgStat_Counter tuples_deleted; /* tuples deleted in xact */ PgStat_Counter tuples_deleted; /* tuples deleted in xact */
Oid t_id; /* table's OID */ Oid t_id; /* table's OID */
bool t_shared; /* is it a shared catalog? */ bool t_shared; /* is it a shared catalog? */
} TwoPhasePgStatRecord; } TwoPhasePgStatRecord;
/* /*
* Info about current "snapshot" of stats file * Info about current "snapshot" of stats file
@ -221,7 +221,7 @@ static void pgstat_recv_resetcounter(PgStat_MsgResetcounter *msg, int len);
static void pgstat_recv_autovac(PgStat_MsgAutovacStart *msg, int len); static void pgstat_recv_autovac(PgStat_MsgAutovacStart *msg, int len);
static void pgstat_recv_vacuum(PgStat_MsgVacuum *msg, int len); static void pgstat_recv_vacuum(PgStat_MsgVacuum *msg, int len);
static void pgstat_recv_analyze(PgStat_MsgAnalyze *msg, int len); static void pgstat_recv_analyze(PgStat_MsgAnalyze *msg, int len);
static void pgstat_recv_bgwriter(PgStat_MsgBgWriter * msg, int len); static void pgstat_recv_bgwriter(PgStat_MsgBgWriter *msg, int len);
/* ------------------------------------------------------------ /* ------------------------------------------------------------
@ -1203,7 +1203,7 @@ get_tabstat_stack_level(int nest_level)
* add_tabstat_xact_level - add a new (sub)transaction state record * add_tabstat_xact_level - add a new (sub)transaction state record
*/ */
static void static void
add_tabstat_xact_level(PgStat_TableStatus * pgstat_info, int nest_level) add_tabstat_xact_level(PgStat_TableStatus *pgstat_info, int nest_level)
{ {
PgStat_SubXactStatus *xact_state; PgStat_SubXactStatus *xact_state;
PgStat_TableXactStatus *trans; PgStat_TableXactStatus *trans;
@ -2365,7 +2365,7 @@ PgstatCollectorMain(int argc, char *argv[])
break; break;
case PGSTAT_MTYPE_BGWRITER: case PGSTAT_MTYPE_BGWRITER:
pgstat_recv_bgwriter((PgStat_MsgBgWriter *) & msg, len); pgstat_recv_bgwriter((PgStat_MsgBgWriter *) &msg, len);
break; break;
default: default:
@ -3160,7 +3160,7 @@ pgstat_recv_analyze(PgStat_MsgAnalyze *msg, int len)
* ---------- * ----------
*/ */
static void static void
pgstat_recv_bgwriter(PgStat_MsgBgWriter * msg, int len) pgstat_recv_bgwriter(PgStat_MsgBgWriter *msg, int len)
{ {
globalStats.timed_checkpoints += msg->m_timed_checkpoints; globalStats.timed_checkpoints += msg->m_timed_checkpoints;
globalStats.requested_checkpoints += msg->m_requested_checkpoints; globalStats.requested_checkpoints += msg->m_requested_checkpoints;

View File

@ -37,7 +37,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.547 2007/11/15 21:14:37 momjian Exp $ * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.548 2007/11/15 22:25:16 momjian Exp $
* *
* NOTES * NOTES
* *
@ -257,7 +257,7 @@ typedef enum
PM_SHUTDOWN, /* waiting for bgwriter to do shutdown ckpt */ PM_SHUTDOWN, /* waiting for bgwriter to do shutdown ckpt */
PM_WAIT_DEAD_END, /* waiting for dead_end children to exit */ PM_WAIT_DEAD_END, /* waiting for dead_end children to exit */
PM_NO_CHILDREN /* all important children have exited */ PM_NO_CHILDREN /* all important children have exited */
} PMState; } PMState;
static PMState pmState = PM_INIT; static PMState pmState = PM_INIT;

View File

@ -18,7 +18,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/postmaster/syslogger.c,v 1.41 2007/11/15 21:14:37 momjian Exp $ * $PostgreSQL: pgsql/src/backend/postmaster/syslogger.c,v 1.42 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -103,7 +103,7 @@ typedef struct
{ {
int32 pid; /* PID of source process */ int32 pid; /* PID of source process */
StringInfoData data; /* accumulated data, as a StringInfo */ StringInfoData data; /* accumulated data, as a StringInfo */
} save_buffer; } save_buffer;
#define CHUNK_SLOTS 20 #define CHUNK_SLOTS 20
static save_buffer saved_chunks[CHUNK_SLOTS]; static save_buffer saved_chunks[CHUNK_SLOTS];

View File

@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/snowball/dict_snowball.c,v 1.4 2007/11/15 21:14:37 momjian Exp $ * $PostgreSQL: pgsql/src/backend/snowball/dict_snowball.c,v 1.5 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -78,7 +78,7 @@ typedef struct stemmer_module
struct SN_env *(*create) (void); struct SN_env *(*create) (void);
void (*close) (struct SN_env *); void (*close) (struct SN_env *);
int (*stem) (struct SN_env *); int (*stem) (struct SN_env *);
} stemmer_module; } stemmer_module;
static const stemmer_module stemmer_modules[] = static const stemmer_module stemmer_modules[] =
{ {
@ -140,11 +140,11 @@ typedef struct DictSnowball
* context, so we just remember CurrentMemoryContext * context, so we just remember CurrentMemoryContext
*/ */
MemoryContext dictCtx; MemoryContext dictCtx;
} DictSnowball; } DictSnowball;
static void static void
locate_stem_module(DictSnowball * d, char *lang) locate_stem_module(DictSnowball *d, char *lang)
{ {
const stemmer_module *m; const stemmer_module *m;

View File

@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/storage/buffer/freelist.c,v 1.62 2007/11/15 21:14:37 momjian Exp $ * $PostgreSQL: pgsql/src/backend/storage/buffer/freelist.c,v 1.63 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -77,7 +77,7 @@ typedef struct BufferAccessStrategyData
* struct. * struct.
*/ */
Buffer buffers[1]; /* VARIABLE SIZE ARRAY */ Buffer buffers[1]; /* VARIABLE SIZE ARRAY */
} BufferAccessStrategyData; } BufferAccessStrategyData;
/* Prototypes for internal functions */ /* Prototypes for internal functions */

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/storage/smgr/md.c,v 1.132 2007/11/15 21:49:47 tgl Exp $ * $PostgreSQL: pgsql/src/backend/storage/smgr/md.c,v 1.133 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -125,7 +125,7 @@ typedef struct
{ {
RelFileNode rnode; /* the targeted relation */ RelFileNode rnode; /* the targeted relation */
BlockNumber segno; /* which segment */ BlockNumber segno; /* which segment */
} PendingOperationTag; } PendingOperationTag;
typedef uint16 CycleCtr; /* can be any convenient integer size */ typedef uint16 CycleCtr; /* can be any convenient integer size */
@ -140,7 +140,7 @@ typedef struct
{ {
RelFileNode rnode; /* the dead relation to delete */ RelFileNode rnode; /* the dead relation to delete */
CycleCtr cycle_ctr; /* mdckpt_cycle_ctr when request was made */ CycleCtr cycle_ctr; /* mdckpt_cycle_ctr when request was made */
} PendingUnlinkEntry; } PendingUnlinkEntry;
static HTAB *pendingOpsTable = NULL; static HTAB *pendingOpsTable = NULL;
static List *pendingUnlinks = NIL; static List *pendingUnlinks = NIL;
@ -154,7 +154,7 @@ typedef enum /* behavior for mdopen & _mdfd_getseg */
EXTENSION_FAIL, /* ereport if segment not present */ EXTENSION_FAIL, /* ereport if segment not present */
EXTENSION_RETURN_NULL, /* return NULL if not present */ EXTENSION_RETURN_NULL, /* return NULL if not present */
EXTENSION_CREATE /* create new segments as needed */ EXTENSION_CREATE /* create new segments as needed */
} ExtensionBehavior; } ExtensionBehavior;
/* local routines */ /* local routines */
static MdfdVec *mdopen(SMgrRelation reln, ExtensionBehavior behavior); static MdfdVec *mdopen(SMgrRelation reln, ExtensionBehavior behavior);
@ -318,12 +318,12 @@ mdunlink(RelFileNode rnode, bool isRedo)
else else
{ {
/* truncate(2) would be easier here, but Windows hasn't got it */ /* truncate(2) would be easier here, but Windows hasn't got it */
int fd; int fd;
fd = BasicOpenFile(path, O_RDWR | PG_BINARY, 0); fd = BasicOpenFile(path, O_RDWR | PG_BINARY, 0);
if (fd >= 0) if (fd >= 0)
{ {
int save_errno; int save_errno;
ret = ftruncate(fd, 0); ret = ftruncate(fd, 0);
save_errno = errno; save_errno = errno;

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/tcop/pquery.c,v 1.118 2007/11/15 21:14:38 momjian Exp $ * $PostgreSQL: pgsql/src/backend/tcop/pquery.c,v 1.119 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -32,7 +32,7 @@
Portal ActivePortal = NULL; Portal ActivePortal = NULL;
static void ProcessQuery(PlannedStmt * plan, static void ProcessQuery(PlannedStmt *plan,
ParamListInfo params, ParamListInfo params,
DestReceiver *dest, DestReceiver *dest,
char *completionTag); char *completionTag);
@ -57,7 +57,7 @@ static void DoPortalRewind(Portal portal);
* CreateQueryDesc * CreateQueryDesc
*/ */
QueryDesc * QueryDesc *
CreateQueryDesc(PlannedStmt * plannedstmt, CreateQueryDesc(PlannedStmt *plannedstmt,
Snapshot snapshot, Snapshot snapshot,
Snapshot crosscheck_snapshot, Snapshot crosscheck_snapshot,
DestReceiver *dest, DestReceiver *dest,
@ -141,7 +141,7 @@ FreeQueryDesc(QueryDesc *qdesc)
* error; otherwise the executor's memory usage will be leaked. * error; otherwise the executor's memory usage will be leaked.
*/ */
static void static void
ProcessQuery(PlannedStmt * plan, ProcessQuery(PlannedStmt *plan,
ParamListInfo params, ParamListInfo params,
DestReceiver *dest, DestReceiver *dest,
char *completionTag) char *completionTag)

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/tsearch/dict_ispell.c,v 1.4 2007/11/15 21:14:38 momjian Exp $ * $PostgreSQL: pgsql/src/backend/tsearch/dict_ispell.c,v 1.5 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -26,7 +26,7 @@ typedef struct
{ {
StopList stoplist; StopList stoplist;
IspellDict obj; IspellDict obj;
} DictISpell; } DictISpell;
Datum Datum
dispell_init(PG_FUNCTION_ARGS) dispell_init(PG_FUNCTION_ARGS)

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/tsearch/dict_simple.c,v 1.5 2007/11/15 21:14:38 momjian Exp $ * $PostgreSQL: pgsql/src/backend/tsearch/dict_simple.c,v 1.6 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -24,7 +24,7 @@ typedef struct
{ {
StopList stoplist; StopList stoplist;
bool accept; bool accept;
} DictSimple; } DictSimple;
Datum Datum

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/tsearch/dict_synonym.c,v 1.5 2007/11/15 21:14:38 momjian Exp $ * $PostgreSQL: pgsql/src/backend/tsearch/dict_synonym.c,v 1.6 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -24,13 +24,13 @@ typedef struct
{ {
char *in; char *in;
char *out; char *out;
} Syn; } Syn;
typedef struct typedef struct
{ {
int len; /* length of syn array */ int len; /* length of syn array */
Syn *syn; Syn *syn;
} DictSyn; } DictSyn;
/* /*
* Finds the next whitespace-delimited word within the 'in' string. * Finds the next whitespace-delimited word within the 'in' string.

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/tsearch/dict_thesaurus.c,v 1.7 2007/11/15 21:14:38 momjian Exp $ * $PostgreSQL: pgsql/src/backend/tsearch/dict_thesaurus.c,v 1.8 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -35,20 +35,20 @@ typedef struct LexemeInfo
uint16 tnvariant; /* total num lexemes in one variant */ uint16 tnvariant; /* total num lexemes in one variant */
struct LexemeInfo *nextentry; struct LexemeInfo *nextentry;
struct LexemeInfo *nextvariant; struct LexemeInfo *nextvariant;
} LexemeInfo; } LexemeInfo;
typedef struct typedef struct
{ {
char *lexeme; char *lexeme;
LexemeInfo *entries; LexemeInfo *entries;
} TheLexeme; } TheLexeme;
typedef struct typedef struct
{ {
uint16 lastlexeme; /* number lexemes to substitute */ uint16 lastlexeme; /* number lexemes to substitute */
uint16 reslen; uint16 reslen;
TSLexeme *res; /* prepared substituted result */ TSLexeme *res; /* prepared substituted result */
} TheSubstitute; } TheSubstitute;
typedef struct typedef struct
{ {
@ -66,11 +66,11 @@ typedef struct
*/ */
TheSubstitute *subst; TheSubstitute *subst;
int nsubst; int nsubst;
} DictThesaurus; } DictThesaurus;
static void static void
newLexeme(DictThesaurus * d, char *b, char *e, uint16 idsubst, uint16 posinsubst) newLexeme(DictThesaurus *d, char *b, char *e, uint16 idsubst, uint16 posinsubst)
{ {
TheLexeme *ptr; TheLexeme *ptr;
@ -104,7 +104,7 @@ newLexeme(DictThesaurus * d, char *b, char *e, uint16 idsubst, uint16 posinsubst
} }
static void static void
addWrd(DictThesaurus * d, char *b, char *e, uint16 idsubst, uint16 nwrd, uint16 posinsubst, bool useasis) addWrd(DictThesaurus *d, char *b, char *e, uint16 idsubst, uint16 nwrd, uint16 posinsubst, bool useasis)
{ {
static int nres = 0; static int nres = 0;
static int ntres = 0; static int ntres = 0;
@ -167,7 +167,7 @@ addWrd(DictThesaurus * d, char *b, char *e, uint16 idsubst, uint16 nwrd, uint16
#define TR_INSUBS 4 #define TR_INSUBS 4
static void static void
thesaurusRead(char *filename, DictThesaurus * d) thesaurusRead(char *filename, DictThesaurus *d)
{ {
FILE *fh; FILE *fh;
int lineno = 0; int lineno = 0;
@ -311,7 +311,7 @@ thesaurusRead(char *filename, DictThesaurus * d)
} }
static TheLexeme * static TheLexeme *
addCompiledLexeme(TheLexeme * newwrds, int *nnw, int *tnm, TSLexeme * lexeme, LexemeInfo * src, uint16 tnvariant) addCompiledLexeme(TheLexeme *newwrds, int *nnw, int *tnm, TSLexeme *lexeme, LexemeInfo *src, uint16 tnvariant)
{ {
if (*nnw >= *tnm) if (*nnw >= *tnm)
@ -343,7 +343,7 @@ addCompiledLexeme(TheLexeme * newwrds, int *nnw, int *tnm, TSLexeme * lexeme, Le
} }
static int static int
cmpLexemeInfo(LexemeInfo * a, LexemeInfo * b) cmpLexemeInfo(LexemeInfo *a, LexemeInfo *b)
{ {
if (a == NULL || b == NULL) if (a == NULL || b == NULL)
return 0; return 0;
@ -365,7 +365,7 @@ cmpLexemeInfo(LexemeInfo * a, LexemeInfo * b)
} }
static int static int
cmpLexeme(TheLexeme * a, TheLexeme * b) cmpLexeme(TheLexeme *a, TheLexeme *b)
{ {
if (a->lexeme == NULL) if (a->lexeme == NULL)
{ {
@ -400,7 +400,7 @@ cmpTheLexeme(const void *a, const void *b)
} }
static void static void
compileTheLexeme(DictThesaurus * d) compileTheLexeme(DictThesaurus *d)
{ {
int i, int i,
nnw = 0, nnw = 0,
@ -503,7 +503,7 @@ compileTheLexeme(DictThesaurus * d)
} }
static void static void
compileTheSubstitute(DictThesaurus * d) compileTheSubstitute(DictThesaurus *d)
{ {
int i; int i;
@ -651,7 +651,7 @@ thesaurus_init(PG_FUNCTION_ARGS)
} }
static LexemeInfo * static LexemeInfo *
findTheLexeme(DictThesaurus * d, char *lexeme) findTheLexeme(DictThesaurus *d, char *lexeme)
{ {
TheLexeme key, TheLexeme key,
*res; *res;
@ -670,7 +670,7 @@ findTheLexeme(DictThesaurus * d, char *lexeme)
} }
static bool static bool
matchIdSubst(LexemeInfo * stored, uint16 idsubst) matchIdSubst(LexemeInfo *stored, uint16 idsubst)
{ {
bool res = true; bool res = true;
@ -690,7 +690,7 @@ matchIdSubst(LexemeInfo * stored, uint16 idsubst)
} }
static LexemeInfo * static LexemeInfo *
findVariant(LexemeInfo * in, LexemeInfo * stored, uint16 curpos, LexemeInfo ** newin, int newn) findVariant(LexemeInfo *in, LexemeInfo *stored, uint16 curpos, LexemeInfo **newin, int newn)
{ {
for (;;) for (;;)
{ {
@ -749,7 +749,7 @@ findVariant(LexemeInfo * in, LexemeInfo * stored, uint16 curpos, LexemeInfo ** n
} }
static TSLexeme * static TSLexeme *
copyTSLexeme(TheSubstitute * ts) copyTSLexeme(TheSubstitute *ts)
{ {
TSLexeme *res; TSLexeme *res;
uint16 i; uint16 i;
@ -767,7 +767,7 @@ copyTSLexeme(TheSubstitute * ts)
} }
static TSLexeme * static TSLexeme *
checkMatch(DictThesaurus * d, LexemeInfo * info, uint16 curpos, bool *moreres) checkMatch(DictThesaurus *d, LexemeInfo *info, uint16 curpos, bool *moreres)
{ {
*moreres = false; *moreres = false;
while (info) while (info)

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/tsearch/regis.c,v 1.1 2007/08/21 01:11:18 tgl Exp $ * $PostgreSQL: pgsql/src/backend/tsearch/regis.c,v 1.2 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -39,7 +39,7 @@ RS_isRegis(const char *str)
#define RS_IN_WAIT 4 #define RS_IN_WAIT 4
static RegisNode * static RegisNode *
newRegisNode(RegisNode * prev, int len) newRegisNode(RegisNode *prev, int len)
{ {
RegisNode *ptr; RegisNode *ptr;
@ -50,7 +50,7 @@ newRegisNode(RegisNode * prev, int len)
} }
void void
RS_compile(Regis * r, bool issuffix, char *str) RS_compile(Regis *r, bool issuffix, char *str)
{ {
int len = strlen(str); int len = strlen(str);
int state = RS_IN_WAIT; int state = RS_IN_WAIT;
@ -137,7 +137,7 @@ RS_compile(Regis * r, bool issuffix, char *str)
} }
void void
RS_free(Regis * r) RS_free(Regis *r)
{ {
RegisNode *ptr = r->node, RegisNode *ptr = r->node,
*tmp; *tmp;
@ -189,7 +189,7 @@ mb_strchr(char *str, char *c)
bool bool
RS_execute(Regis * r, char *str) RS_execute(Regis *r, char *str)
{ {
RegisNode *ptr = r->node; RegisNode *ptr = r->node;
char *c = str; char *c = str;

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/tsearch/spell.c,v 1.6 2007/11/15 21:14:38 momjian Exp $ * $PostgreSQL: pgsql/src/backend/tsearch/spell.c,v 1.7 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -165,7 +165,7 @@ cmpaffix(const void *s1, const void *s2)
} }
static void static void
NIAddSpell(IspellDict * Conf, const char *word, const char *flag) NIAddSpell(IspellDict *Conf, const char *word, const char *flag)
{ {
if (Conf->nspell >= Conf->mspell) if (Conf->nspell >= Conf->mspell)
{ {
@ -192,7 +192,7 @@ NIAddSpell(IspellDict * Conf, const char *word, const char *flag)
* Note caller must already have applied get_tsearch_config_filename * Note caller must already have applied get_tsearch_config_filename
*/ */
void void
NIImportDictionary(IspellDict * Conf, const char *filename) NIImportDictionary(IspellDict *Conf, const char *filename)
{ {
FILE *dict; FILE *dict;
char *line; char *line;
@ -255,7 +255,7 @@ NIImportDictionary(IspellDict * Conf, const char *filename)
static int static int
FindWord(IspellDict * Conf, const char *word, int affixflag, int flag) FindWord(IspellDict *Conf, const char *word, int affixflag, int flag)
{ {
SPNode *node = Conf->Dictionary; SPNode *node = Conf->Dictionary;
SPNodeData *StopLow, SPNodeData *StopLow,
@ -303,7 +303,7 @@ FindWord(IspellDict * Conf, const char *word, int affixflag, int flag)
} }
static void static void
NIAddAffix(IspellDict * Conf, int flag, char flagflags, const char *mask, const char *find, const char *repl, int type) NIAddAffix(IspellDict *Conf, int flag, char flagflags, const char *mask, const char *find, const char *repl, int type)
{ {
AFFIX *Affix; AFFIX *Affix;
@ -512,7 +512,7 @@ parse_affentry(char *str, char *mask, char *find, char *repl,
} }
static void static void
addFlagValue(IspellDict * Conf, char *s, uint32 val, addFlagValue(IspellDict *Conf, char *s, uint32 val,
const char *filename, int lineno) const char *filename, int lineno)
{ {
while (*s && t_isspace(s)) while (*s && t_isspace(s))
@ -535,7 +535,7 @@ addFlagValue(IspellDict * Conf, char *s, uint32 val,
} }
static void static void
NIImportOOAffixes(IspellDict * Conf, const char *filename) NIImportOOAffixes(IspellDict *Conf, const char *filename)
{ {
char type[BUFSIZ], char type[BUFSIZ],
*ptype = NULL; *ptype = NULL;
@ -702,7 +702,7 @@ nextline:
* Note caller must already have applied get_tsearch_config_filename * Note caller must already have applied get_tsearch_config_filename
*/ */
void void
NIImportAffixes(IspellDict * Conf, const char *filename) NIImportAffixes(IspellDict *Conf, const char *filename)
{ {
char *pstr = NULL; char *pstr = NULL;
char mask[BUFSIZ]; char mask[BUFSIZ];
@ -842,7 +842,7 @@ nextline:
} }
static int static int
MergeAffix(IspellDict * Conf, int a1, int a2) MergeAffix(IspellDict *Conf, int a1, int a2)
{ {
char **ptr; char **ptr;
@ -865,7 +865,7 @@ MergeAffix(IspellDict * Conf, int a1, int a2)
} }
static uint32 static uint32
makeCompoundFlags(IspellDict * Conf, int affix) makeCompoundFlags(IspellDict *Conf, int affix)
{ {
uint32 flag = 0; uint32 flag = 0;
char *str = Conf->AffixData[affix]; char *str = Conf->AffixData[affix];
@ -880,7 +880,7 @@ makeCompoundFlags(IspellDict * Conf, int affix)
} }
static SPNode * static SPNode *
mkSPNode(IspellDict * Conf, int low, int high, int level) mkSPNode(IspellDict *Conf, int low, int high, int level)
{ {
int i; int i;
int nchar = 0; int nchar = 0;
@ -960,7 +960,7 @@ mkSPNode(IspellDict * Conf, int low, int high, int level)
* and affixes. * and affixes.
*/ */
void void
NISortDictionary(IspellDict * Conf) NISortDictionary(IspellDict *Conf)
{ {
int i; int i;
int naffix = 0; int naffix = 0;
@ -1011,7 +1011,7 @@ NISortDictionary(IspellDict * Conf)
} }
static AffixNode * static AffixNode *
mkANode(IspellDict * Conf, int low, int high, int level, int type) mkANode(IspellDict *Conf, int low, int high, int level, int type)
{ {
int i; int i;
int nchar = 0; int nchar = 0;
@ -1082,7 +1082,7 @@ mkANode(IspellDict * Conf, int low, int high, int level, int type)
} }
static void static void
mkVoidAffix(IspellDict * Conf, bool issuffix, int startsuffix) mkVoidAffix(IspellDict *Conf, bool issuffix, int startsuffix)
{ {
int i, int i,
cnt = 0; cnt = 0;
@ -1125,7 +1125,7 @@ mkVoidAffix(IspellDict * Conf, bool issuffix, int startsuffix)
} }
static bool static bool
isAffixInUse(IspellDict * Conf, char flag) isAffixInUse(IspellDict *Conf, char flag)
{ {
int i; int i;
@ -1137,7 +1137,7 @@ isAffixInUse(IspellDict * Conf, char flag)
} }
void void
NISortAffixes(IspellDict * Conf) NISortAffixes(IspellDict *Conf)
{ {
AFFIX *Affix; AFFIX *Affix;
size_t i; size_t i;
@ -1187,12 +1187,12 @@ NISortAffixes(IspellDict * Conf)
} }
static AffixNodeData * static AffixNodeData *
FindAffixes(AffixNode * node, const char *word, int wrdlen, int *level, int type) FindAffixes(AffixNode *node, const char *word, int wrdlen, int *level, int type)
{ {
AffixNodeData *StopLow, AffixNodeData *StopLow,
*StopHigh, *StopHigh,
*StopMiddle; *StopMiddle;
uint8 symbol; uint8 symbol;
if (node->isvoid) if (node->isvoid)
{ /* search void affixes */ { /* search void affixes */
@ -1209,6 +1209,7 @@ FindAffixes(AffixNode * node, const char *word, int wrdlen, int *level, int type
{ {
StopMiddle = StopLow + ((StopHigh - StopLow) >> 1); StopMiddle = StopLow + ((StopHigh - StopLow) >> 1);
symbol = GETWCHAR(word, wrdlen, *level, type); symbol = GETWCHAR(word, wrdlen, *level, type);
if (StopMiddle->val == symbol) if (StopMiddle->val == symbol)
{ {
(*level)++; (*level)++;
@ -1229,7 +1230,7 @@ FindAffixes(AffixNode * node, const char *word, int wrdlen, int *level, int type
} }
static char * static char *
CheckAffix(const char *word, size_t len, AFFIX * Affix, int flagflags, char *newword, int *baselen) CheckAffix(const char *word, size_t len, AFFIX *Affix, int flagflags, char *newword, int *baselen)
{ {
/* /*
* Check compound allow flags * Check compound allow flags
@ -1335,7 +1336,7 @@ addToResult(char **forms, char **cur, char *word)
} }
static char ** static char **
NormalizeSubWord(IspellDict * Conf, char *word, int flag) NormalizeSubWord(IspellDict *Conf, char *word, int flag)
{ {
AffixNodeData *suffix = NULL, AffixNodeData *suffix = NULL,
*prefix = NULL; *prefix = NULL;
@ -1449,10 +1450,10 @@ typedef struct SplitVar
int nstem; int nstem;
char **stem; char **stem;
struct SplitVar *next; struct SplitVar *next;
} SplitVar; } SplitVar;
static int static int
CheckCompoundAffixes(CMPDAffix ** ptr, char *word, int len, bool CheckInPlace) CheckCompoundAffixes(CMPDAffix **ptr, char *word, int len, bool CheckInPlace)
{ {
bool issuffix; bool issuffix;
@ -1490,7 +1491,7 @@ CheckCompoundAffixes(CMPDAffix ** ptr, char *word, int len, bool CheckInPlace)
} }
static SplitVar * static SplitVar *
CopyVar(SplitVar * s, int makedup) CopyVar(SplitVar *s, int makedup)
{ {
SplitVar *v = (SplitVar *) palloc(sizeof(SplitVar)); SplitVar *v = (SplitVar *) palloc(sizeof(SplitVar));
@ -1511,7 +1512,7 @@ CopyVar(SplitVar * s, int makedup)
static SplitVar * static SplitVar *
SplitToVariants(IspellDict * Conf, SPNode * snode, SplitVar * orig, char *word, int wordlen, int startpos, int minpos) SplitToVariants(IspellDict *Conf, SPNode *snode, SplitVar *orig, char *word, int wordlen, int startpos, int minpos)
{ {
SplitVar *var = NULL; SplitVar *var = NULL;
SPNodeData *StopLow, SPNodeData *StopLow,
@ -1660,7 +1661,7 @@ SplitToVariants(IspellDict * Conf, SPNode * snode, SplitVar * orig, char *word,
} }
TSLexeme * TSLexeme *
NINormalizeWord(IspellDict * Conf, char *word) NINormalizeWord(IspellDict *Conf, char *word)
{ {
char **res; char **res;
TSLexeme *lcur = NULL, TSLexeme *lcur = NULL,

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/tsearch/to_tsany.c,v 1.6 2007/11/15 21:14:38 momjian Exp $ * $PostgreSQL: pgsql/src/backend/tsearch/to_tsany.c,v 1.7 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -52,7 +52,7 @@ compareWORD(const void *a, const void *b)
} }
static int static int
uniqueWORD(ParsedWord * a, int4 l) uniqueWORD(ParsedWord *a, int4 l)
{ {
ParsedWord *ptr, ParsedWord *ptr,
*res; *res;
@ -138,7 +138,7 @@ uniqueWORD(ParsedWord * a, int4 l)
* make value of tsvector, given parsed text * make value of tsvector, given parsed text
*/ */
TSVector TSVector
make_tsvector(ParsedText * prs) make_tsvector(ParsedText *prs)
{ {
int i, int i,
j, j,

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/tsearch/ts_parse.c,v 1.4 2007/11/15 21:14:38 momjian Exp $ * $PostgreSQL: pgsql/src/backend/tsearch/ts_parse.c,v 1.5 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -31,13 +31,13 @@ typedef struct ParsedLex
int lenlemm; int lenlemm;
bool resfollow; bool resfollow;
struct ParsedLex *next; struct ParsedLex *next;
} ParsedLex; } ParsedLex;
typedef struct ListParsedLex typedef struct ListParsedLex
{ {
ParsedLex *head; ParsedLex *head;
ParsedLex *tail; ParsedLex *tail;
} ListParsedLex; } ListParsedLex;
typedef struct typedef struct
{ {
@ -56,10 +56,10 @@ typedef struct
ParsedLex *lastRes; ParsedLex *lastRes;
TSLexeme *tmpRes; TSLexeme *tmpRes;
} LexizeData; } LexizeData;
static void static void
LexizeInit(LexizeData * ld, TSConfigCacheEntry * cfg) LexizeInit(LexizeData *ld, TSConfigCacheEntry *cfg)
{ {
ld->cfg = cfg; ld->cfg = cfg;
ld->curDictId = InvalidOid; ld->curDictId = InvalidOid;
@ -71,7 +71,7 @@ LexizeInit(LexizeData * ld, TSConfigCacheEntry * cfg)
} }
static void static void
LPLAddTail(ListParsedLex * list, ParsedLex * newpl) LPLAddTail(ListParsedLex *list, ParsedLex *newpl)
{ {
if (list->tail) if (list->tail)
{ {
@ -84,7 +84,7 @@ LPLAddTail(ListParsedLex * list, ParsedLex * newpl)
} }
static ParsedLex * static ParsedLex *
LPLRemoveHead(ListParsedLex * list) LPLRemoveHead(ListParsedLex *list)
{ {
ParsedLex *res = list->head; ParsedLex *res = list->head;
@ -98,7 +98,7 @@ LPLRemoveHead(ListParsedLex * list)
} }
static void static void
LexizeAddLemm(LexizeData * ld, int type, char *lemm, int lenlemm) LexizeAddLemm(LexizeData *ld, int type, char *lemm, int lenlemm)
{ {
ParsedLex *newpl = (ParsedLex *) palloc(sizeof(ParsedLex)); ParsedLex *newpl = (ParsedLex *) palloc(sizeof(ParsedLex));
@ -111,7 +111,7 @@ LexizeAddLemm(LexizeData * ld, int type, char *lemm, int lenlemm)
} }
static void static void
RemoveHead(LexizeData * ld) RemoveHead(LexizeData *ld)
{ {
LPLAddTail(&ld->waste, LPLRemoveHead(&ld->towork)); LPLAddTail(&ld->waste, LPLRemoveHead(&ld->towork));
@ -119,7 +119,7 @@ RemoveHead(LexizeData * ld)
} }
static void static void
setCorrLex(LexizeData * ld, ParsedLex ** correspondLexem) setCorrLex(LexizeData *ld, ParsedLex **correspondLexem)
{ {
if (correspondLexem) if (correspondLexem)
{ {
@ -141,7 +141,7 @@ setCorrLex(LexizeData * ld, ParsedLex ** correspondLexem)
} }
static void static void
moveToWaste(LexizeData * ld, ParsedLex * stop) moveToWaste(LexizeData *ld, ParsedLex *stop)
{ {
bool go = true; bool go = true;
@ -157,7 +157,7 @@ moveToWaste(LexizeData * ld, ParsedLex * stop)
} }
static void static void
setNewTmpRes(LexizeData * ld, ParsedLex * lex, TSLexeme * res) setNewTmpRes(LexizeData *ld, ParsedLex *lex, TSLexeme *res)
{ {
if (ld->tmpRes) if (ld->tmpRes)
{ {
@ -172,7 +172,7 @@ setNewTmpRes(LexizeData * ld, ParsedLex * lex, TSLexeme * res)
} }
static TSLexeme * static TSLexeme *
LexizeExec(LexizeData * ld, ParsedLex ** correspondLexem) LexizeExec(LexizeData *ld, ParsedLex **correspondLexem)
{ {
int i; int i;
ListDictionary *map; ListDictionary *map;
@ -349,7 +349,7 @@ LexizeExec(LexizeData * ld, ParsedLex ** correspondLexem)
* prs will be filled in. * prs will be filled in.
*/ */
void void
parsetext(Oid cfgId, ParsedText * prs, char *buf, int buflen) parsetext(Oid cfgId, ParsedText *prs, char *buf, int buflen)
{ {
int type, int type,
lenlemm; lenlemm;
@ -429,7 +429,7 @@ parsetext(Oid cfgId, ParsedText * prs, char *buf, int buflen)
* Headline framework * Headline framework
*/ */
static void static void
hladdword(HeadlineParsedText * prs, char *buf, int buflen, int type) hladdword(HeadlineParsedText *prs, char *buf, int buflen, int type)
{ {
while (prs->curwords >= prs->lenwords) while (prs->curwords >= prs->lenwords)
{ {
@ -445,7 +445,7 @@ hladdword(HeadlineParsedText * prs, char *buf, int buflen, int type)
} }
static void static void
hlfinditem(HeadlineParsedText * prs, TSQuery query, char *buf, int buflen) hlfinditem(HeadlineParsedText *prs, TSQuery query, char *buf, int buflen)
{ {
int i; int i;
QueryItem *item = GETQUERY(query); QueryItem *item = GETQUERY(query);
@ -479,7 +479,7 @@ hlfinditem(HeadlineParsedText * prs, TSQuery query, char *buf, int buflen)
} }
static void static void
addHLParsedLex(HeadlineParsedText * prs, TSQuery query, ParsedLex * lexs, TSLexeme * norms) addHLParsedLex(HeadlineParsedText *prs, TSQuery query, ParsedLex *lexs, TSLexeme *norms)
{ {
ParsedLex *tmplexs; ParsedLex *tmplexs;
TSLexeme *ptr; TSLexeme *ptr;
@ -515,7 +515,7 @@ addHLParsedLex(HeadlineParsedText * prs, TSQuery query, ParsedLex * lexs, TSLexe
} }
void void
hlparsetext(Oid cfgId, HeadlineParsedText * prs, TSQuery query, char *buf, int buflen) hlparsetext(Oid cfgId, HeadlineParsedText *prs, TSQuery query, char *buf, int buflen)
{ {
int type, int type,
lenlemm; lenlemm;
@ -575,7 +575,7 @@ hlparsetext(Oid cfgId, HeadlineParsedText * prs, TSQuery query, char *buf, int b
} }
text * text *
generateHeadline(HeadlineParsedText * prs) generateHeadline(HeadlineParsedText *prs)
{ {
text *out; text *out;
int len = 128; int len = 128;

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/tsearch/ts_utils.c,v 1.6 2007/11/15 21:14:38 momjian Exp $ * $PostgreSQL: pgsql/src/backend/tsearch/ts_utils.c,v 1.7 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -74,7 +74,7 @@ comparestr(const void *a, const void *b)
* or palloc a new version. * or palloc a new version.
*/ */
void void
readstoplist(const char *fname, StopList * s, char *(*wordop) (const char *)) readstoplist(const char *fname, StopList *s, char *(*wordop) (const char *))
{ {
char **stop = NULL; char **stop = NULL;
@ -147,7 +147,7 @@ readstoplist(const char *fname, StopList * s, char *(*wordop) (const char *))
} }
bool bool
searchstoplist(StopList * s, char *key) searchstoplist(StopList *s, char *key)
{ {
return (s->stop && s->len > 0 && return (s->stop && s->len > 0 &&
bsearch(&key, s->stop, s->len, bsearch(&key, s->stop, s->len,

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/tsearch/wparser.c,v 1.4 2007/11/15 21:14:38 momjian Exp $ * $PostgreSQL: pgsql/src/backend/tsearch/wparser.c,v 1.5 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -37,7 +37,7 @@ typedef struct
{ {
int cur; int cur;
LexDescr *list; LexDescr *list;
} TSTokenTypeStorage; } TSTokenTypeStorage;
static void static void
tt_setup_firstcall(FuncCallContext *funcctx, Oid prsid) tt_setup_firstcall(FuncCallContext *funcctx, Oid prsid)
@ -150,14 +150,14 @@ typedef struct
{ {
int type; int type;
char *lexeme; char *lexeme;
} LexemeEntry; } LexemeEntry;
typedef struct typedef struct
{ {
int cur; int cur;
int len; int len;
LexemeEntry *list; LexemeEntry *list;
} PrsStorage; } PrsStorage;
static void static void

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/tsearch/wparser_def.c,v 1.9 2007/11/15 21:14:38 momjian Exp $ * $PostgreSQL: pgsql/src/backend/tsearch/wparser_def.c,v 1.10 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -189,7 +189,7 @@ typedef enum
TPS_InHyphenNumWordPart, TPS_InHyphenNumWordPart,
TPS_InHyphenUnsignedInt, TPS_InHyphenUnsignedInt,
TPS_Null /* last state (fake value) */ TPS_Null /* last state (fake value) */
} TParserState; } TParserState;
/* forward declaration */ /* forward declaration */
struct TParser; struct TParser;
@ -207,7 +207,7 @@ typedef struct
TParserState tostate; TParserState tostate;
int type; int type;
TParserSpecial special; TParserSpecial special;
} TParserStateActionItem; } TParserStateActionItem;
/* Flag bits in TParserStateActionItem.flags */ /* Flag bits in TParserStateActionItem.flags */
#define A_NEXT 0x0000 #define A_NEXT 0x0000
@ -229,7 +229,7 @@ typedef struct TParserPosition
TParserState state; TParserState state;
struct TParserPosition *prev; struct TParserPosition *prev;
const TParserStateActionItem *pushedAtAction; const TParserStateActionItem *pushedAtAction;
} TParserPosition; } TParserPosition;
typedef struct TParser typedef struct TParser
{ {
@ -256,15 +256,15 @@ typedef struct TParser
int lenbytetoken; int lenbytetoken;
int lenchartoken; int lenchartoken;
int type; int type;
} TParser; } TParser;
/* forward decls here */ /* forward decls here */
static bool TParserGet(TParser * prs); static bool TParserGet(TParser *prs);
static TParserPosition * static TParserPosition *
newTParserPosition(TParserPosition * prev) newTParserPosition(TParserPosition *prev)
{ {
TParserPosition *res = (TParserPosition *) palloc(sizeof(TParserPosition)); TParserPosition *res = (TParserPosition *) palloc(sizeof(TParserPosition));
@ -316,7 +316,7 @@ TParserInit(char *str, int len)
} }
static void static void
TParserClose(TParser * prs) TParserClose(TParser *prs)
{ {
while (prs->state) while (prs->state)
{ {
@ -365,7 +365,7 @@ p_isnot##type(TParser *prs) { \
} }
static int static int
p_isalnum(TParser * prs) p_isalnum(TParser *prs)
{ {
Assert(prs->state); Assert(prs->state);
@ -391,13 +391,13 @@ p_isalnum(TParser * prs)
return isalnum(*(unsigned char *) (prs->str + prs->state->posbyte)); return isalnum(*(unsigned char *) (prs->str + prs->state->posbyte));
} }
static int static int
p_isnotalnum(TParser * prs) p_isnotalnum(TParser *prs)
{ {
return !p_isalnum(prs); return !p_isalnum(prs);
} }
static int static int
p_isalpha(TParser * prs) p_isalpha(TParser *prs)
{ {
Assert(prs->state); Assert(prs->state);
@ -424,7 +424,7 @@ p_isalpha(TParser * prs)
} }
static int static int
p_isnotalpha(TParser * prs) p_isnotalpha(TParser *prs)
{ {
return !p_isalpha(prs); return !p_isalpha(prs);
} }
@ -432,7 +432,7 @@ p_isnotalpha(TParser * prs)
/* p_iseq should be used only for ascii symbols */ /* p_iseq should be used only for ascii symbols */
static int static int
p_iseq(TParser * prs, char c) p_iseq(TParser *prs, char c)
{ {
Assert(prs->state); Assert(prs->state);
return ((prs->state->charlen == 1 && *(prs->str + prs->state->posbyte) == c)) ? 1 : 0; return ((prs->state->charlen == 1 && *(prs->str + prs->state->posbyte) == c)) ? 1 : 0;
@ -453,7 +453,7 @@ p_isnot##type(TParser *prs) { \
static int static int
p_iseq(TParser * prs, char c) p_iseq(TParser *prs, char c)
{ {
Assert(prs->state); Assert(prs->state);
return (*(prs->str + prs->state->posbyte) == c) ? 1 : 0; return (*(prs->str + prs->state->posbyte) == c) ? 1 : 0;
@ -472,32 +472,32 @@ p_iswhat(upper)
p_iswhat(xdigit) p_iswhat(xdigit)
static int static int
p_isEOF(TParser * prs) p_isEOF(TParser *prs)
{ {
Assert(prs->state); Assert(prs->state);
return (prs->state->posbyte == prs->lenstr || prs->state->charlen == 0) ? 1 : 0; return (prs->state->posbyte == prs->lenstr || prs->state->charlen == 0) ? 1 : 0;
} }
static int static int
p_iseqC(TParser * prs) p_iseqC(TParser *prs)
{ {
return p_iseq(prs, prs->c); return p_iseq(prs, prs->c);
} }
static int static int
p_isneC(TParser * prs) p_isneC(TParser *prs)
{ {
return !p_iseq(prs, prs->c); return !p_iseq(prs, prs->c);
} }
static int static int
p_isascii(TParser * prs) p_isascii(TParser *prs)
{ {
return (prs->state->charlen == 1 && isascii((unsigned char) *(prs->str + prs->state->posbyte))) ? 1 : 0; return (prs->state->charlen == 1 && isascii((unsigned char) *(prs->str + prs->state->posbyte))) ? 1 : 0;
} }
static int static int
p_isasclet(TParser * prs) p_isasclet(TParser *prs)
{ {
return (p_isascii(prs) && p_isalpha(prs)) ? 1 : 0; return (p_isascii(prs) && p_isalpha(prs)) ? 1 : 0;
} }
@ -533,7 +533,7 @@ _make_compiler_happy(void)
static void static void
SpecialTags(TParser * prs) SpecialTags(TParser *prs)
{ {
switch (prs->state->lenchartoken) switch (prs->state->lenchartoken)
{ {
@ -557,7 +557,7 @@ SpecialTags(TParser * prs)
} }
static void static void
SpecialFURL(TParser * prs) SpecialFURL(TParser *prs)
{ {
prs->wanthost = true; prs->wanthost = true;
prs->state->posbyte -= prs->state->lenbytetoken; prs->state->posbyte -= prs->state->lenbytetoken;
@ -565,14 +565,14 @@ SpecialFURL(TParser * prs)
} }
static void static void
SpecialHyphen(TParser * prs) SpecialHyphen(TParser *prs)
{ {
prs->state->posbyte -= prs->state->lenbytetoken; prs->state->posbyte -= prs->state->lenbytetoken;
prs->state->poschar -= prs->state->lenchartoken; prs->state->poschar -= prs->state->lenchartoken;
} }
static void static void
SpecialVerVersion(TParser * prs) SpecialVerVersion(TParser *prs)
{ {
prs->state->posbyte -= prs->state->lenbytetoken; prs->state->posbyte -= prs->state->lenbytetoken;
prs->state->poschar -= prs->state->lenchartoken; prs->state->poschar -= prs->state->lenchartoken;
@ -581,7 +581,7 @@ SpecialVerVersion(TParser * prs)
} }
static int static int
p_isstophost(TParser * prs) p_isstophost(TParser *prs)
{ {
if (prs->wanthost) if (prs->wanthost)
{ {
@ -592,13 +592,13 @@ p_isstophost(TParser * prs)
} }
static int static int
p_isignore(TParser * prs) p_isignore(TParser *prs)
{ {
return (prs->ignore) ? 1 : 0; return (prs->ignore) ? 1 : 0;
} }
static int static int
p_ishost(TParser * prs) p_ishost(TParser *prs)
{ {
TParser *tmpprs = TParserInit(prs->str + prs->state->posbyte, prs->lenstr - prs->state->posbyte); TParser *tmpprs = TParserInit(prs->str + prs->state->posbyte, prs->lenstr - prs->state->posbyte);
int res = 0; int res = 0;
@ -618,7 +618,7 @@ p_ishost(TParser * prs)
} }
static int static int
p_isURLPath(TParser * prs) p_isURLPath(TParser *prs)
{ {
TParser *tmpprs = TParserInit(prs->str + prs->state->posbyte, prs->lenstr - prs->state->posbyte); TParser *tmpprs = TParserInit(prs->str + prs->state->posbyte, prs->lenstr - prs->state->posbyte);
int res = 0; int res = 0;
@ -1244,7 +1244,7 @@ typedef struct
#ifdef WPARSER_TRACE #ifdef WPARSER_TRACE
const char *state_name; /* only for debug printout */ const char *state_name; /* only for debug printout */
#endif #endif
} TParserStateAction; } TParserStateAction;
#ifdef WPARSER_TRACE #ifdef WPARSER_TRACE
#define TPARSERSTATEACTION(state) \ #define TPARSERSTATEACTION(state) \
@ -1338,7 +1338,7 @@ static const TParserStateAction Actions[] = {
static bool static bool
TParserGet(TParser * prs) TParserGet(TParser *prs)
{ {
const TParserStateActionItem *item = NULL; const TParserStateActionItem *item = NULL;
@ -1566,10 +1566,10 @@ typedef struct
{ {
HeadlineWordEntry *words; HeadlineWordEntry *words;
int len; int len;
} hlCheck; } hlCheck;
static bool static bool
checkcondition_HL(void *checkval, QueryOperand * val) checkcondition_HL(void *checkval, QueryOperand *val)
{ {
int i; int i;
@ -1583,7 +1583,7 @@ checkcondition_HL(void *checkval, QueryOperand * val)
static bool static bool
hlCover(HeadlineParsedText * prs, TSQuery query, int *p, int *q) hlCover(HeadlineParsedText *prs, TSQuery query, int *p, int *q)
{ {
int i, int i,
j; j;

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/regexp.c,v 1.76 2007/11/15 21:14:39 momjian Exp $ * $PostgreSQL: pgsql/src/backend/utils/adt/regexp.c,v 1.77 2007/11/15 22:25:16 momjian Exp $
* *
* Alistair Crooks added the code for the regex caching * Alistair Crooks added the code for the regex caching
* agc - cached the regular expressions used - there's a good chance * agc - cached the regular expressions used - there's a good chance
@ -48,7 +48,7 @@ typedef struct pg_re_flags
{ {
int cflags; /* compile flags for Spencer's regex code */ int cflags; /* compile flags for Spencer's regex code */
bool glob; /* do it globally (for each occurrence) */ bool glob; /* do it globally (for each occurrence) */
} pg_re_flags; } pg_re_flags;
/* cross-call state for regexp_matches(), also regexp_split() */ /* cross-call state for regexp_matches(), also regexp_split() */
typedef struct regexp_matches_ctx typedef struct regexp_matches_ctx
@ -63,7 +63,7 @@ typedef struct regexp_matches_ctx
/* workspace for build_regexp_matches_result() */ /* workspace for build_regexp_matches_result() */
Datum *elems; /* has npatterns elements */ Datum *elems; /* has npatterns elements */
bool *nulls; /* has npatterns elements */ bool *nulls; /* has npatterns elements */
} regexp_matches_ctx; } regexp_matches_ctx;
/* /*
* We cache precompiled regular expressions using a "self organizing list" * We cache precompiled regular expressions using a "self organizing list"
@ -113,9 +113,9 @@ static regexp_matches_ctx *setup_regexp_matches(text *orig_str, text *pattern,
bool force_glob, bool force_glob,
bool use_subpatterns, bool use_subpatterns,
bool ignore_degenerate); bool ignore_degenerate);
static void cleanup_regexp_matches(regexp_matches_ctx * matchctx); static void cleanup_regexp_matches(regexp_matches_ctx *matchctx);
static ArrayType *build_regexp_matches_result(regexp_matches_ctx * matchctx); static ArrayType *build_regexp_matches_result(regexp_matches_ctx *matchctx);
static Datum build_regexp_split_result(regexp_matches_ctx * splitctx); static Datum build_regexp_split_result(regexp_matches_ctx *splitctx);
/* /*
@ -345,7 +345,7 @@ RE_compile_and_execute(text *text_re, char *dat, int dat_len,
* don't want some have to reject them after the fact. * don't want some have to reject them after the fact.
*/ */
static void static void
parse_re_flags(pg_re_flags * flags, text *opts) parse_re_flags(pg_re_flags *flags, text *opts)
{ {
/* regex_flavor is always folded into the compile flags */ /* regex_flavor is always folded into the compile flags */
flags->cflags = regex_flavor; flags->cflags = regex_flavor;
@ -981,7 +981,7 @@ setup_regexp_matches(text *orig_str, text *pattern, text *flags,
* cleanup_regexp_matches - release memory of a regexp_matches_ctx * cleanup_regexp_matches - release memory of a regexp_matches_ctx
*/ */
static void static void
cleanup_regexp_matches(regexp_matches_ctx * matchctx) cleanup_regexp_matches(regexp_matches_ctx *matchctx)
{ {
pfree(matchctx->orig_str); pfree(matchctx->orig_str);
pfree(matchctx->match_locs); pfree(matchctx->match_locs);
@ -996,7 +996,7 @@ cleanup_regexp_matches(regexp_matches_ctx * matchctx)
* build_regexp_matches_result - build output array for current match * build_regexp_matches_result - build output array for current match
*/ */
static ArrayType * static ArrayType *
build_regexp_matches_result(regexp_matches_ctx * matchctx) build_regexp_matches_result(regexp_matches_ctx *matchctx)
{ {
Datum *elems = matchctx->elems; Datum *elems = matchctx->elems;
bool *nulls = matchctx->nulls; bool *nulls = matchctx->nulls;
@ -1136,7 +1136,7 @@ regexp_split_to_array_no_flags(PG_FUNCTION_ARGS)
* or the string after the last match when next_match == nmatches. * or the string after the last match when next_match == nmatches.
*/ */
static Datum static Datum
build_regexp_split_result(regexp_matches_ctx * splitctx) build_regexp_split_result(regexp_matches_ctx *splitctx)
{ {
int startpos; int startpos;
int endpos; int endpos;

View File

@ -15,7 +15,7 @@
* *
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* *
* $PostgreSQL: pgsql/src/backend/utils/adt/ri_triggers.c,v 1.98 2007/11/15 21:14:39 momjian Exp $ * $PostgreSQL: pgsql/src/backend/utils/adt/ri_triggers.c,v 1.99 2007/11/15 22:25:16 momjian Exp $
* *
* ---------- * ----------
*/ */
@ -108,7 +108,7 @@ typedef struct RI_ConstraintInfo
* PK) */ * PK) */
Oid ff_eq_oprs[RI_MAX_NUMKEYS]; /* equality operators (FK = Oid ff_eq_oprs[RI_MAX_NUMKEYS]; /* equality operators (FK =
* FK) */ * FK) */
} RI_ConstraintInfo; } RI_ConstraintInfo;
/* ---------- /* ----------
@ -150,7 +150,7 @@ typedef struct RI_CompareKey
{ {
Oid eq_opr; /* the equality operator to apply */ Oid eq_opr; /* the equality operator to apply */
Oid typeid; /* the data type to apply it to */ Oid typeid; /* the data type to apply it to */
} RI_CompareKey; } RI_CompareKey;
/* ---------- /* ----------
@ -163,7 +163,7 @@ typedef struct RI_CompareHashEntry
bool valid; /* successfully initialized? */ bool valid; /* successfully initialized? */
FmgrInfo eq_opr_finfo; /* call info for equality fn */ FmgrInfo eq_opr_finfo; /* call info for equality fn */
FmgrInfo cast_func_finfo; /* in case we must coerce input */ FmgrInfo cast_func_finfo; /* in case we must coerce input */
} RI_CompareHashEntry; } RI_CompareHashEntry;
/* ---------- /* ----------
@ -188,23 +188,23 @@ static void ri_GenerateQual(StringInfo buf,
static int ri_NullCheck(Relation rel, HeapTuple tup, static int ri_NullCheck(Relation rel, HeapTuple tup,
RI_QueryKey *key, int pairidx); RI_QueryKey *key, int pairidx);
static void ri_BuildQueryKeyFull(RI_QueryKey *key, static void ri_BuildQueryKeyFull(RI_QueryKey *key,
const RI_ConstraintInfo * riinfo, const RI_ConstraintInfo *riinfo,
int32 constr_queryno); int32 constr_queryno);
static void ri_BuildQueryKeyPkCheck(RI_QueryKey *key, static void ri_BuildQueryKeyPkCheck(RI_QueryKey *key,
const RI_ConstraintInfo * riinfo, const RI_ConstraintInfo *riinfo,
int32 constr_queryno); int32 constr_queryno);
static bool ri_KeysEqual(Relation rel, HeapTuple oldtup, HeapTuple newtup, static bool ri_KeysEqual(Relation rel, HeapTuple oldtup, HeapTuple newtup,
const RI_ConstraintInfo * riinfo, bool rel_is_pk); const RI_ConstraintInfo *riinfo, bool rel_is_pk);
static bool ri_AllKeysUnequal(Relation rel, HeapTuple oldtup, HeapTuple newtup, static bool ri_AllKeysUnequal(Relation rel, HeapTuple oldtup, HeapTuple newtup,
const RI_ConstraintInfo * riinfo, bool rel_is_pk); const RI_ConstraintInfo *riinfo, bool rel_is_pk);
static bool ri_OneKeyEqual(Relation rel, int column, static bool ri_OneKeyEqual(Relation rel, int column,
HeapTuple oldtup, HeapTuple newtup, HeapTuple oldtup, HeapTuple newtup,
const RI_ConstraintInfo * riinfo, bool rel_is_pk); const RI_ConstraintInfo *riinfo, bool rel_is_pk);
static bool ri_AttributesEqual(Oid eq_opr, Oid typeid, static bool ri_AttributesEqual(Oid eq_opr, Oid typeid,
Datum oldvalue, Datum newvalue); Datum oldvalue, Datum newvalue);
static bool ri_Check_Pk_Match(Relation pk_rel, Relation fk_rel, static bool ri_Check_Pk_Match(Relation pk_rel, Relation fk_rel,
HeapTuple old_row, HeapTuple old_row,
const RI_ConstraintInfo * riinfo); const RI_ConstraintInfo *riinfo);
static void ri_InitHashTables(void); static void ri_InitHashTables(void);
static SPIPlanPtr ri_FetchPreparedPlan(RI_QueryKey *key); static SPIPlanPtr ri_FetchPreparedPlan(RI_QueryKey *key);
@ -213,7 +213,7 @@ static RI_CompareHashEntry *ri_HashCompareOp(Oid eq_opr, Oid typeid);
static void ri_CheckTrigger(FunctionCallInfo fcinfo, const char *funcname, static void ri_CheckTrigger(FunctionCallInfo fcinfo, const char *funcname,
int tgkind); int tgkind);
static void ri_FetchConstraintInfo(RI_ConstraintInfo * riinfo, static void ri_FetchConstraintInfo(RI_ConstraintInfo *riinfo,
Trigger *trigger, Relation trig_rel, bool rel_is_pk); Trigger *trigger, Relation trig_rel, bool rel_is_pk);
static SPIPlanPtr ri_PlanCheck(const char *querystr, int nargs, Oid *argtypes, static SPIPlanPtr ri_PlanCheck(const char *querystr, int nargs, Oid *argtypes,
RI_QueryKey *qkey, Relation fk_rel, Relation pk_rel, RI_QueryKey *qkey, Relation fk_rel, Relation pk_rel,
@ -541,7 +541,7 @@ RI_FKey_check_upd(PG_FUNCTION_ARGS)
static bool static bool
ri_Check_Pk_Match(Relation pk_rel, Relation fk_rel, ri_Check_Pk_Match(Relation pk_rel, Relation fk_rel,
HeapTuple old_row, HeapTuple old_row,
const RI_ConstraintInfo * riinfo) const RI_ConstraintInfo *riinfo)
{ {
SPIPlanPtr qplan; SPIPlanPtr qplan;
RI_QueryKey qkey; RI_QueryKey qkey;
@ -2945,7 +2945,7 @@ ri_GenerateQual(StringInfo buf,
* ---------- * ----------
*/ */
static void static void
ri_BuildQueryKeyFull(RI_QueryKey *key, const RI_ConstraintInfo * riinfo, ri_BuildQueryKeyFull(RI_QueryKey *key, const RI_ConstraintInfo *riinfo,
int32 constr_queryno) int32 constr_queryno)
{ {
int i; int i;
@ -3022,7 +3022,7 @@ ri_CheckTrigger(FunctionCallInfo fcinfo, const char *funcname, int tgkind)
* Fetch the pg_constraint entry for the FK constraint, and fill *riinfo * Fetch the pg_constraint entry for the FK constraint, and fill *riinfo
*/ */
static void static void
ri_FetchConstraintInfo(RI_ConstraintInfo * riinfo, ri_FetchConstraintInfo(RI_ConstraintInfo *riinfo,
Trigger *trigger, Relation trig_rel, bool rel_is_pk) Trigger *trigger, Relation trig_rel, bool rel_is_pk)
{ {
Oid constraintOid = trigger->tgconstraint; Oid constraintOid = trigger->tgconstraint;
@ -3486,7 +3486,7 @@ ri_ReportViolation(RI_QueryKey *qkey, const char *constrname,
* ---------- * ----------
*/ */
static void static void
ri_BuildQueryKeyPkCheck(RI_QueryKey *key, const RI_ConstraintInfo * riinfo, ri_BuildQueryKeyPkCheck(RI_QueryKey *key, const RI_ConstraintInfo *riinfo,
int32 constr_queryno) int32 constr_queryno)
{ {
int i; int i;
@ -3636,7 +3636,7 @@ ri_HashPreparedPlan(RI_QueryKey *key, SPIPlanPtr plan)
*/ */
static bool static bool
ri_KeysEqual(Relation rel, HeapTuple oldtup, HeapTuple newtup, ri_KeysEqual(Relation rel, HeapTuple oldtup, HeapTuple newtup,
const RI_ConstraintInfo * riinfo, bool rel_is_pk) const RI_ConstraintInfo *riinfo, bool rel_is_pk)
{ {
TupleDesc tupdesc = RelationGetDescr(rel); TupleDesc tupdesc = RelationGetDescr(rel);
const int16 *attnums; const int16 *attnums;
@ -3694,7 +3694,7 @@ ri_KeysEqual(Relation rel, HeapTuple oldtup, HeapTuple newtup,
*/ */
static bool static bool
ri_AllKeysUnequal(Relation rel, HeapTuple oldtup, HeapTuple newtup, ri_AllKeysUnequal(Relation rel, HeapTuple oldtup, HeapTuple newtup,
const RI_ConstraintInfo * riinfo, bool rel_is_pk) const RI_ConstraintInfo *riinfo, bool rel_is_pk)
{ {
TupleDesc tupdesc = RelationGetDescr(rel); TupleDesc tupdesc = RelationGetDescr(rel);
const int16 *attnums; const int16 *attnums;
@ -3756,7 +3756,7 @@ ri_AllKeysUnequal(Relation rel, HeapTuple oldtup, HeapTuple newtup,
*/ */
static bool static bool
ri_OneKeyEqual(Relation rel, int column, HeapTuple oldtup, HeapTuple newtup, ri_OneKeyEqual(Relation rel, int column, HeapTuple oldtup, HeapTuple newtup,
const RI_ConstraintInfo * riinfo, bool rel_is_pk) const RI_ConstraintInfo *riinfo, bool rel_is_pk)
{ {
TupleDesc tupdesc = RelationGetDescr(rel); TupleDesc tupdesc = RelationGetDescr(rel);
const int16 *attnums; const int16 *attnums;

View File

@ -15,7 +15,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/selfuncs.c,v 1.240 2007/11/15 21:14:39 momjian Exp $ * $PostgreSQL: pgsql/src/backend/utils/adt/selfuncs.c,v 1.241 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -3160,8 +3160,7 @@ convert_string_datum(Datum value, Oid typid)
/* /*
* *
* http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx * http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx
* ?FeedbackID=99694 * ?FeedbackID=99694 */
*/
{ {
char x[1]; char x[1];

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/tsginidx.c,v 1.6 2007/11/15 21:14:39 momjian Exp $ * $PostgreSQL: pgsql/src/backend/utils/adt/tsginidx.c,v 1.7 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -113,10 +113,10 @@ typedef struct
{ {
QueryItem *frst; QueryItem *frst;
bool *mapped_check; bool *mapped_check;
} GinChkVal; } GinChkVal;
static bool static bool
checkcondition_gin(void *checkval, QueryOperand * val) checkcondition_gin(void *checkval, QueryOperand *val)
{ {
GinChkVal *gcv = (GinChkVal *) checkval; GinChkVal *gcv = (GinChkVal *) checkval;

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/tsquery.c,v 1.9 2007/11/15 21:14:39 momjian Exp $ * $PostgreSQL: pgsql/src/backend/utils/adt/tsquery.c,v 1.10 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -106,7 +106,7 @@ typedef enum
PT_OPR = 3, PT_OPR = 3,
PT_OPEN = 4, PT_OPEN = 4,
PT_CLOSE = 5, PT_CLOSE = 5,
} ts_tokentype; } ts_tokentype;
/* /*
* get token from query string * get token from query string
@ -390,7 +390,7 @@ makepol(TSQueryParserState state,
} }
static void static void
findoprnd_recurse(QueryItem * ptr, uint32 *pos, int nnodes) findoprnd_recurse(QueryItem *ptr, uint32 *pos, int nnodes)
{ {
/* since this function recurses, it could be driven to stack overflow. */ /* since this function recurses, it could be driven to stack overflow. */
check_stack_depth(); check_stack_depth();
@ -435,7 +435,7 @@ findoprnd_recurse(QueryItem * ptr, uint32 *pos, int nnodes)
* QueryItems must be in polish (prefix) notation. * QueryItems must be in polish (prefix) notation.
*/ */
static void static void
findoprnd(QueryItem * ptr, int size) findoprnd(QueryItem *ptr, int size)
{ {
uint32 pos; uint32 pos;
@ -576,7 +576,7 @@ typedef struct
char *cur; char *cur;
char *op; char *op;
int buflen; int buflen;
} INFIX; } INFIX;
/* Makes sure inf->buf is large enough for adding 'addsize' bytes */ /* Makes sure inf->buf is large enough for adding 'addsize' bytes */
#define RESIZEBUF(inf, addsize) \ #define RESIZEBUF(inf, addsize) \
@ -593,7 +593,7 @@ while( ( (inf)->cur - (inf)->buf ) + (addsize) + 1 >= (inf)->buflen ) \
* infix (human-readable) view * infix (human-readable) view
*/ */
static void static void
infix(INFIX * in, bool first) infix(INFIX *in, bool first)
{ {
/* since this function recurses, it could be driven to stack overflow. */ /* since this function recurses, it could be driven to stack overflow. */
check_stack_depth(); check_stack_depth();

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/tsquery_cleanup.c,v 1.6 2007/11/15 21:14:39 momjian Exp $ * $PostgreSQL: pgsql/src/backend/utils/adt/tsquery_cleanup.c,v 1.7 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -24,13 +24,13 @@ typedef struct NODE
struct NODE *left; struct NODE *left;
struct NODE *right; struct NODE *right;
QueryItem *valnode; QueryItem *valnode;
} NODE; } NODE;
/* /*
* make query tree from plain view of query * make query tree from plain view of query
*/ */
static NODE * static NODE *
maketree(QueryItem * in) maketree(QueryItem *in)
{ {
NODE *node = (NODE *) palloc(sizeof(NODE)); NODE *node = (NODE *) palloc(sizeof(NODE));
@ -53,10 +53,10 @@ typedef struct
QueryItem *ptr; QueryItem *ptr;
int len; /* allocated size of ptr */ int len; /* allocated size of ptr */
int cur; /* number of elements in ptr */ int cur; /* number of elements in ptr */
} PLAINTREE; } PLAINTREE;
static void static void
plainnode(PLAINTREE * state, NODE * node) plainnode(PLAINTREE *state, NODE *node)
{ {
/* since this function recurses, it could be driven to stack overflow. */ /* since this function recurses, it could be driven to stack overflow. */
check_stack_depth(); check_stack_depth();
@ -91,7 +91,7 @@ plainnode(PLAINTREE * state, NODE * node)
* make plain view of tree from a NODE-tree representation * make plain view of tree from a NODE-tree representation
*/ */
static QueryItem * static QueryItem *
plaintree(NODE * root, int *len) plaintree(NODE *root, int *len)
{ {
PLAINTREE pl; PLAINTREE pl;
@ -109,7 +109,7 @@ plaintree(NODE * root, int *len)
} }
static void static void
freetree(NODE * node) freetree(NODE *node)
{ {
/* since this function recurses, it could be driven to stack overflow. */ /* since this function recurses, it could be driven to stack overflow. */
check_stack_depth(); check_stack_depth();
@ -130,7 +130,7 @@ freetree(NODE * node)
* Operator ! always return TRUE * Operator ! always return TRUE
*/ */
static NODE * static NODE *
clean_NOT_intree(NODE * node) clean_NOT_intree(NODE *node)
{ {
/* since this function recurses, it could be driven to stack overflow. */ /* since this function recurses, it could be driven to stack overflow. */
check_stack_depth(); check_stack_depth();
@ -183,7 +183,7 @@ clean_NOT_intree(NODE * node)
} }
QueryItem * QueryItem *
clean_NOT(QueryItem * ptr, int *len) clean_NOT(QueryItem *ptr, int *len)
{ {
NODE *root = maketree(ptr); NODE *root = maketree(ptr);
@ -214,7 +214,7 @@ clean_NOT(QueryItem * ptr, int *len)
* text (stopword) * text (stopword)
*/ */
static NODE * static NODE *
clean_fakeval_intree(NODE * node, char *result) clean_fakeval_intree(NODE *node, char *result)
{ {
char lresult = V_UNKNOWN, char lresult = V_UNKNOWN,
rresult = V_UNKNOWN; rresult = V_UNKNOWN;
@ -272,7 +272,7 @@ clean_fakeval_intree(NODE * node, char *result)
} }
QueryItem * QueryItem *
clean_fakeval(QueryItem * ptr, int *len) clean_fakeval(QueryItem *ptr, int *len)
{ {
NODE *root = maketree(ptr); NODE *root = maketree(ptr);
char result = V_UNKNOWN; char result = V_UNKNOWN;

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/tsquery_gist.c,v 1.2 2007/11/15 21:14:39 momjian Exp $ * $PostgreSQL: pgsql/src/backend/utils/adt/tsquery_gist.c,v 1.3 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -142,7 +142,7 @@ typedef struct
{ {
OffsetNumber pos; OffsetNumber pos;
int4 cost; int4 cost;
} SPLITCOST; } SPLITCOST;
static int static int
comparecost(const void *a, const void *b) comparecost(const void *a, const void *b)

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/tsquery_rewrite.c,v 1.9 2007/11/15 21:14:39 momjian Exp $ * $PostgreSQL: pgsql/src/backend/utils/adt/tsquery_rewrite.c,v 1.10 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -43,7 +43,7 @@ addone(int *counters, int last, int total)
* by returning either node or a copy of subs. * by returning either node or a copy of subs.
*/ */
static QTNode * static QTNode *
findeq(QTNode * node, QTNode * ex, QTNode * subs, bool *isfind) findeq(QTNode *node, QTNode *ex, QTNode *subs, bool *isfind)
{ {
if ((node->sign & ex->sign) != ex->sign || if ((node->sign & ex->sign) != ex->sign ||
@ -174,7 +174,7 @@ findeq(QTNode * node, QTNode * ex, QTNode * subs, bool *isfind)
} }
static QTNode * static QTNode *
dofindsubquery(QTNode * root, QTNode * ex, QTNode * subs, bool *isfind) dofindsubquery(QTNode *root, QTNode *ex, QTNode *subs, bool *isfind)
{ {
/* since this function recurses, it could be driven to stack overflow. */ /* since this function recurses, it could be driven to stack overflow. */
check_stack_depth(); check_stack_depth();
@ -193,7 +193,7 @@ dofindsubquery(QTNode * root, QTNode * ex, QTNode * subs, bool *isfind)
} }
static QTNode * static QTNode *
dropvoidsubtree(QTNode * root) dropvoidsubtree(QTNode *root)
{ {
if (!root) if (!root)
@ -233,7 +233,7 @@ dropvoidsubtree(QTNode * root)
} }
QTNode * QTNode *
findsubquery(QTNode * root, QTNode * ex, QTNode * subs, bool *isfind) findsubquery(QTNode *root, QTNode *ex, QTNode *subs, bool *isfind)
{ {
bool DidFind = false; bool DidFind = false;

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/tsquery_util.c,v 1.6 2007/11/15 21:14:39 momjian Exp $ * $PostgreSQL: pgsql/src/backend/utils/adt/tsquery_util.c,v 1.7 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -19,7 +19,7 @@
#include "miscadmin.h" #include "miscadmin.h"
QTNode * QTNode *
QT2QTN(QueryItem * in, char *operand) QT2QTN(QueryItem *in, char *operand)
{ {
QTNode *node = (QTNode *) palloc0(sizeof(QTNode)); QTNode *node = (QTNode *) palloc0(sizeof(QTNode));
@ -52,7 +52,7 @@ QT2QTN(QueryItem * in, char *operand)
} }
void void
QTNFree(QTNode * in) QTNFree(QTNode *in)
{ {
if (!in) if (!in)
return; return;
@ -84,7 +84,7 @@ QTNFree(QTNode * in)
} }
int int
QTNodeCompare(QTNode * an, QTNode * bn) QTNodeCompare(QTNode *an, QTNode *bn)
{ {
/* since this function recurses, it could be driven to stack overflow. */ /* since this function recurses, it could be driven to stack overflow. */
check_stack_depth(); check_stack_depth();
@ -139,7 +139,7 @@ cmpQTN(const void *a, const void *b)
} }
void void
QTNSort(QTNode * in) QTNSort(QTNode *in)
{ {
int i; int i;
@ -156,7 +156,7 @@ QTNSort(QTNode * in)
} }
bool bool
QTNEq(QTNode * a, QTNode * b) QTNEq(QTNode *a, QTNode *b)
{ {
uint32 sign = a->sign & b->sign; uint32 sign = a->sign & b->sign;
@ -174,7 +174,7 @@ QTNEq(QTNode * a, QTNode * b)
* b c * b c
*/ */
void void
QTNTernary(QTNode * in) QTNTernary(QTNode *in)
{ {
int i; int i;
@ -217,7 +217,7 @@ QTNTernary(QTNode * in)
* (Opposite of QTNTernary) * (Opposite of QTNTernary)
*/ */
void void
QTNBinary(QTNode * in) QTNBinary(QTNode *in)
{ {
int i; int i;
@ -261,7 +261,7 @@ QTNBinary(QTNode * in)
* terminators. * terminators.
*/ */
static void static void
cntsize(QTNode * in, int *sumlen, int *nnode) cntsize(QTNode *in, int *sumlen, int *nnode)
{ {
/* since this function recurses, it could be driven to stack overflow. */ /* since this function recurses, it could be driven to stack overflow. */
check_stack_depth(); check_stack_depth();
@ -285,10 +285,10 @@ typedef struct
QueryItem *curitem; QueryItem *curitem;
char *operand; char *operand;
char *curoperand; char *curoperand;
} QTN2QTState; } QTN2QTState;
static void static void
fillQT(QTN2QTState * state, QTNode * in) fillQT(QTN2QTState *state, QTNode *in)
{ {
/* since this function recurses, it could be driven to stack overflow. */ /* since this function recurses, it could be driven to stack overflow. */
check_stack_depth(); check_stack_depth();
@ -325,7 +325,7 @@ fillQT(QTN2QTState * state, QTNode * in)
} }
TSQuery TSQuery
QTN2QT(QTNode * in) QTN2QT(QTNode *in)
{ {
TSQuery out; TSQuery out;
int len; int len;
@ -348,7 +348,7 @@ QTN2QT(QTNode * in)
} }
QTNode * QTNode *
QTNCopy(QTNode * in) QTNCopy(QTNode *in)
{ {
QTNode *out; QTNode *out;
@ -383,7 +383,7 @@ QTNCopy(QTNode * in)
} }
void void
QTNClearFlags(QTNode * in, uint32 flags) QTNClearFlags(QTNode *in, uint32 flags)
{ {
/* since this function recurses, it could be driven to stack overflow. */ /* since this function recurses, it could be driven to stack overflow. */
check_stack_depth(); check_stack_depth();

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/tsrank.c,v 1.10 2007/11/15 21:14:39 momjian Exp $ * $PostgreSQL: pgsql/src/backend/utils/adt/tsrank.c,v 1.11 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -72,7 +72,7 @@ cnt_length(TSVector t)
} }
static int static int
WordECompareQueryItem(char *eval, char *qval, WordEntry * ptr, QueryOperand * item) WordECompareQueryItem(char *eval, char *qval, WordEntry *ptr, QueryOperand *item)
{ {
if (ptr->len == item->length) if (ptr->len == item->length)
return strncmp( return strncmp(
@ -88,7 +88,7 @@ WordECompareQueryItem(char *eval, char *qval, WordEntry * ptr, QueryOperand * it
* is the TSQuery containing 'item'. Returns NULL if not found. * is the TSQuery containing 'item'. Returns NULL if not found.
*/ */
static WordEntry * static WordEntry *
find_wordentry(TSVector t, TSQuery q, QueryOperand * item) find_wordentry(TSVector t, TSQuery q, QueryOperand *item)
{ {
WordEntry *StopLow = ARRPTR(t); WordEntry *StopLow = ARRPTR(t);
WordEntry *StopHigh = (WordEntry *) STRPTR(t); WordEntry *StopHigh = (WordEntry *) STRPTR(t);
@ -469,7 +469,7 @@ typedef struct
int16 nitem; int16 nitem;
uint8 wclass; uint8 wclass;
int32 pos; int32 pos;
} DocRepresentation; } DocRepresentation;
static int static int
compareDocR(const void *va, const void *vb) compareDocR(const void *va, const void *vb)
@ -486,13 +486,13 @@ typedef struct
{ {
TSQuery query; TSQuery query;
bool *operandexist; bool *operandexist;
} QueryRepresentation; } QueryRepresentation;
#define QR_GET_OPERAND_EXISTS(q, v) ( (q)->operandexist[ ((QueryItem*)(v)) - GETQUERY((q)->query) ] ) #define QR_GET_OPERAND_EXISTS(q, v) ( (q)->operandexist[ ((QueryItem*)(v)) - GETQUERY((q)->query) ] )
#define QR_SET_OPERAND_EXISTS(q, v) QR_GET_OPERAND_EXISTS(q,v) = true #define QR_SET_OPERAND_EXISTS(q, v) QR_GET_OPERAND_EXISTS(q,v) = true
static bool static bool
checkcondition_QueryOperand(void *checkval, QueryOperand * val) checkcondition_QueryOperand(void *checkval, QueryOperand *val)
{ {
QueryRepresentation *qr = (QueryRepresentation *) checkval; QueryRepresentation *qr = (QueryRepresentation *) checkval;
@ -506,11 +506,11 @@ typedef struct
int q; int q;
DocRepresentation *begin; DocRepresentation *begin;
DocRepresentation *end; DocRepresentation *end;
} Extention; } Extention;
static bool static bool
Cover(DocRepresentation * doc, int len, QueryRepresentation * qr, Extention * ext) Cover(DocRepresentation *doc, int len, QueryRepresentation *qr, Extention *ext)
{ {
DocRepresentation *ptr; DocRepresentation *ptr;
int lastpos = ext->pos; int lastpos = ext->pos;
@ -591,7 +591,7 @@ Cover(DocRepresentation * doc, int len, QueryRepresentation * qr, Extention * ex
} }
static DocRepresentation * static DocRepresentation *
get_docrep(TSVector txt, QueryRepresentation * qr, int *doclen) get_docrep(TSVector txt, QueryRepresentation *qr, int *doclen)
{ {
QueryItem *item = GETQUERY(qr->query); QueryItem *item = GETQUERY(qr->query);
WordEntry *entry; WordEntry *entry;

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/tsvector.c,v 1.7 2007/11/15 21:14:39 momjian Exp $ * $PostgreSQL: pgsql/src/backend/utils/adt/tsvector.c,v 1.8 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -25,7 +25,7 @@ typedef struct
WordEntry entry; /* must be first! */ WordEntry entry; /* must be first! */
WordEntryPos *pos; WordEntryPos *pos;
int poslen; /* number of elements in pos */ int poslen; /* number of elements in pos */
} WordEntryIN; } WordEntryIN;
/* Compare two WordEntryPos values for qsort */ /* Compare two WordEntryPos values for qsort */
@ -47,7 +47,7 @@ comparePos(const void *a, const void *b)
* Returns new length. * Returns new length.
*/ */
static int static int
uniquePos(WordEntryPos * a, int l) uniquePos(WordEntryPos *a, int l)
{ {
WordEntryPos *ptr, WordEntryPos *ptr,
*res; *res;
@ -100,7 +100,7 @@ compareentry(const void *va, const void *vb, void *arg)
* *outbuflen receives the amount of space needed for strings and positions. * *outbuflen receives the amount of space needed for strings and positions.
*/ */
static int static int
uniqueentry(WordEntryIN * a, int l, char *buf, int *outbuflen) uniqueentry(WordEntryIN *a, int l, char *buf, int *outbuflen)
{ {
int buflen; int buflen;
WordEntryIN *ptr, WordEntryIN *ptr,
@ -171,7 +171,7 @@ uniqueentry(WordEntryIN * a, int l, char *buf, int *outbuflen)
} }
static int static int
WordEntryCMP(WordEntry * a, WordEntry * b, char *buf) WordEntryCMP(WordEntry *a, WordEntry *b, char *buf)
{ {
return compareentry(a, b, buf); return compareentry(a, b, buf);
} }

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/tsvector_parser.c,v 1.3 2007/11/15 21:14:39 momjian Exp $ * $PostgreSQL: pgsql/src/backend/utils/adt/tsvector_parser.c,v 1.4 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -157,7 +157,7 @@ prssyntaxerror(TSVectorParseState state)
bool bool
gettoken_tsvector(TSVectorParseState state, gettoken_tsvector(TSVectorParseState state,
char **strval, int *lenval, char **strval, int *lenval,
WordEntryPos ** pos_ptr, int *poslen, WordEntryPos **pos_ptr, int *poslen,
char **endptr) char **endptr)
{ {
int oldstate = 0; int oldstate = 0;

View File

@ -14,7 +14,7 @@
* Author: Jan Wieck, Afilias USA INC. * Author: Jan Wieck, Afilias USA INC.
* 64-bit txids: Marko Kreen, Skype Technologies * 64-bit txids: Marko Kreen, Skype Technologies
* *
* $PostgreSQL: pgsql/src/backend/utils/adt/txid.c,v 1.2 2007/11/15 21:14:39 momjian Exp $ * $PostgreSQL: pgsql/src/backend/utils/adt/txid.c,v 1.3 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -65,7 +65,7 @@ typedef struct
txid xmin; txid xmin;
txid xmax; txid xmax;
txid xip[1]; /* in-progress txids, xmin <= xip[i] < xmax */ txid xip[1]; /* in-progress txids, xmin <= xip[i] < xmax */
} TxidSnapshot; } TxidSnapshot;
#define TXID_SNAPSHOT_SIZE(nxip) \ #define TXID_SNAPSHOT_SIZE(nxip) \
(offsetof(TxidSnapshot, xip) + sizeof(txid) * (nxip)) (offsetof(TxidSnapshot, xip) + sizeof(txid) * (nxip))
@ -77,14 +77,14 @@ typedef struct
{ {
TransactionId last_xid; TransactionId last_xid;
uint32 epoch; uint32 epoch;
} TxidEpoch; } TxidEpoch;
/* /*
* Fetch epoch data from xact.c. * Fetch epoch data from xact.c.
*/ */
static void static void
load_xid_epoch(TxidEpoch * state) load_xid_epoch(TxidEpoch *state)
{ {
GetNextXidAndEpoch(&state->last_xid, &state->epoch); GetNextXidAndEpoch(&state->last_xid, &state->epoch);
} }
@ -93,7 +93,7 @@ load_xid_epoch(TxidEpoch * state)
* do a TransactionId -> txid conversion for an XID near the given epoch * do a TransactionId -> txid conversion for an XID near the given epoch
*/ */
static txid static txid
convert_xid(TransactionId xid, const TxidEpoch * state) convert_xid(TransactionId xid, const TxidEpoch *state)
{ {
#ifndef INT64_IS_BUSTED #ifndef INT64_IS_BUSTED
uint64 epoch; uint64 epoch;
@ -141,7 +141,7 @@ cmp_txid(const void *aa, const void *bb)
* will not be used. * will not be used.
*/ */
static void static void
sort_snapshot(TxidSnapshot * snap) sort_snapshot(TxidSnapshot *snap)
{ {
if (snap->nxip > 1) if (snap->nxip > 1)
qsort(snap->xip, snap->nxip, sizeof(txid), cmp_txid); qsort(snap->xip, snap->nxip, sizeof(txid), cmp_txid);
@ -151,7 +151,7 @@ sort_snapshot(TxidSnapshot * snap)
* check txid visibility. * check txid visibility.
*/ */
static bool static bool
is_visible_txid(txid value, const TxidSnapshot * snap) is_visible_txid(txid value, const TxidSnapshot *snap)
{ {
if (value < snap->xmin) if (value < snap->xmin)
return true; return true;

View File

@ -6,7 +6,7 @@
* Copyright (c) 2007, PostgreSQL Global Development Group * Copyright (c) 2007, PostgreSQL Global Development Group
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/uuid.c,v 1.5 2007/11/15 21:14:39 momjian Exp $ * $PostgreSQL: pgsql/src/backend/utils/adt/uuid.c,v 1.6 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -27,8 +27,8 @@ struct pg_uuid_t
unsigned char data[UUID_LEN]; unsigned char data[UUID_LEN];
}; };
static void string_to_uuid(const char *source, pg_uuid_t * uuid); static void string_to_uuid(const char *source, pg_uuid_t *uuid);
static int uuid_internal_cmp(const pg_uuid_t * arg1, const pg_uuid_t * arg2); static int uuid_internal_cmp(const pg_uuid_t *arg1, const pg_uuid_t *arg2);
Datum Datum
uuid_in(PG_FUNCTION_ARGS) uuid_in(PG_FUNCTION_ARGS)
@ -80,7 +80,7 @@ uuid_out(PG_FUNCTION_ARGS)
* two formats into the latter format before further processing. * two formats into the latter format before further processing.
*/ */
static void static void
string_to_uuid(const char *source, pg_uuid_t * uuid) string_to_uuid(const char *source, pg_uuid_t *uuid)
{ {
char hex_buf[32]; /* not NUL terminated */ char hex_buf[32]; /* not NUL terminated */
int i; int i;
@ -161,7 +161,7 @@ uuid_send(PG_FUNCTION_ARGS)
/* internal uuid compare function */ /* internal uuid compare function */
static int static int
uuid_internal_cmp(const pg_uuid_t * arg1, const pg_uuid_t * arg2) uuid_internal_cmp(const pg_uuid_t *arg1, const pg_uuid_t *arg2)
{ {
return memcmp(arg1->data, arg2->data, UUID_LEN); return memcmp(arg1->data, arg2->data, UUID_LEN);
} }

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/varlena.c,v 1.160 2007/11/15 21:14:39 momjian Exp $ * $PostgreSQL: pgsql/src/backend/utils/adt/varlena.c,v 1.161 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -40,7 +40,7 @@ typedef struct
pg_wchar *wstr2; /* note: these are palloc'd */ pg_wchar *wstr2; /* note: these are palloc'd */
int len1; /* string lengths in logical characters */ int len1; /* string lengths in logical characters */
int len2; int len2;
} TextPositionState; } TextPositionState;
#define DatumGetUnknownP(X) ((unknown *) PG_DETOAST_DATUM(X)) #define DatumGetUnknownP(X) ((unknown *) PG_DETOAST_DATUM(X))
#define DatumGetUnknownPCopy(X) ((unknown *) PG_DETOAST_DATUM_COPY(X)) #define DatumGetUnknownPCopy(X) ((unknown *) PG_DETOAST_DATUM_COPY(X))
@ -60,9 +60,9 @@ typedef struct
static int text_cmp(text *arg1, text *arg2); static int text_cmp(text *arg1, text *arg2);
static int32 text_length(Datum str); static int32 text_length(Datum str);
static int text_position(text *t1, text *t2); static int text_position(text *t1, text *t2);
static void text_position_setup(text *t1, text *t2, TextPositionState * state); static void text_position_setup(text *t1, text *t2, TextPositionState *state);
static int text_position_next(int start_pos, TextPositionState * state); static int text_position_next(int start_pos, TextPositionState *state);
static void text_position_cleanup(TextPositionState * state); static void text_position_cleanup(TextPositionState *state);
static text *text_substring(Datum str, static text *text_substring(Datum str,
int32 start, int32 start,
int32 length, int32 length,
@ -807,7 +807,7 @@ text_position(text *t1, text *t2)
*/ */
static void static void
text_position_setup(text *t1, text *t2, TextPositionState * state) text_position_setup(text *t1, text *t2, TextPositionState *state)
{ {
int len1 = VARSIZE_ANY_EXHDR(t1); int len1 = VARSIZE_ANY_EXHDR(t1);
int len2 = VARSIZE_ANY_EXHDR(t2); int len2 = VARSIZE_ANY_EXHDR(t2);
@ -841,7 +841,7 @@ text_position_setup(text *t1, text *t2, TextPositionState * state)
} }
static int static int
text_position_next(int start_pos, TextPositionState * state) text_position_next(int start_pos, TextPositionState *state)
{ {
int pos = 0, int pos = 0,
p, p,
@ -899,7 +899,7 @@ text_position_next(int start_pos, TextPositionState * state)
} }
static void static void
text_position_cleanup(TextPositionState * state) text_position_cleanup(TextPositionState *state)
{ {
if (state->use_wchar) if (state->use_wchar)
{ {

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.57 2007/11/15 21:14:39 momjian Exp $ * $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.58 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -186,7 +186,7 @@ xml_in(PG_FUNCTION_ARGS)
static char * static char *
xml_out_internal(xmltype * x, pg_enc target_encoding) xml_out_internal(xmltype *x, pg_enc target_encoding)
{ {
char *str; char *str;
size_t len; size_t len;
@ -540,7 +540,7 @@ xmltotext(PG_FUNCTION_ARGS)
text * text *
xmltotext_with_xmloption(xmltype * data, XmlOptionType xmloption_arg) xmltotext_with_xmloption(xmltype *data, XmlOptionType xmloption_arg)
{ {
if (xmloption_arg == XMLOPTION_DOCUMENT && !xml_is_document(data)) if (xmloption_arg == XMLOPTION_DOCUMENT && !xml_is_document(data))
ereport(ERROR, ereport(ERROR,
@ -553,7 +553,7 @@ xmltotext_with_xmloption(xmltype * data, XmlOptionType xmloption_arg)
xmltype * xmltype *
xmlelement(XmlExprState * xmlExpr, ExprContext *econtext) xmlelement(XmlExprState *xmlExpr, ExprContext *econtext)
{ {
#ifdef USE_LIBXML #ifdef USE_LIBXML
XmlExpr *xexpr = (XmlExpr *) xmlExpr->xprstate.expr; XmlExpr *xexpr = (XmlExpr *) xmlExpr->xprstate.expr;
@ -721,7 +721,7 @@ xmlpi(char *target, text *arg, bool arg_is_null, bool *result_is_null)
xmltype * xmltype *
xmlroot(xmltype * data, text *version, int standalone) xmlroot(xmltype *data, text *version, int standalone)
{ {
#ifdef USE_LIBXML #ifdef USE_LIBXML
char *str; char *str;
@ -871,7 +871,7 @@ xmlvalidate(PG_FUNCTION_ARGS)
bool bool
xml_is_document(xmltype * arg) xml_is_document(xmltype *arg)
{ {
#ifdef USE_LIBXML #ifdef USE_LIBXML
bool result; bool result;

View File

@ -33,7 +33,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/cache/plancache.c,v 1.13 2007/11/15 21:14:40 momjian Exp $ * $PostgreSQL: pgsql/src/backend/utils/cache/plancache.c,v 1.14 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -57,18 +57,18 @@ typedef struct
{ {
void (*callback) (); void (*callback) ();
void *arg; void *arg;
} ScanQueryWalkerContext; } ScanQueryWalkerContext;
typedef struct typedef struct
{ {
Oid inval_relid; Oid inval_relid;
CachedPlan *plan; CachedPlan *plan;
} InvalRelidContext; } InvalRelidContext;
static List *cached_plans_list = NIL; static List *cached_plans_list = NIL;
static void StoreCachedPlan(CachedPlanSource * plansource, List *stmt_list, static void StoreCachedPlan(CachedPlanSource *plansource, List *stmt_list,
MemoryContext plan_context); MemoryContext plan_context);
static List *do_planning(List *querytrees, int cursorOptions); static List *do_planning(List *querytrees, int cursorOptions);
static void AcquireExecutorLocks(List *stmt_list, bool acquire); static void AcquireExecutorLocks(List *stmt_list, bool acquire);
@ -78,12 +78,12 @@ static void UnlockRelid(Oid relid, LOCKMODE lockmode, void *arg);
static void ScanQueryForRelids(Query *parsetree, static void ScanQueryForRelids(Query *parsetree,
void (*callback) (), void (*callback) (),
void *arg); void *arg);
static bool ScanQueryWalker(Node *node, ScanQueryWalkerContext * context); static bool ScanQueryWalker(Node *node, ScanQueryWalkerContext *context);
static bool rowmark_member(List *rowMarks, int rt_index); static bool rowmark_member(List *rowMarks, int rt_index);
static bool plan_list_is_transient(List *stmt_list); static bool plan_list_is_transient(List *stmt_list);
static void PlanCacheCallback(Datum arg, Oid relid); static void PlanCacheCallback(Datum arg, Oid relid);
static void InvalRelid(Oid relid, LOCKMODE lockmode, static void InvalRelid(Oid relid, LOCKMODE lockmode,
InvalRelidContext * context); InvalRelidContext *context);
/* /*
@ -284,7 +284,7 @@ FastCreateCachedPlan(Node *raw_parse_tree,
* Common subroutine for CreateCachedPlan and RevalidateCachedPlan. * Common subroutine for CreateCachedPlan and RevalidateCachedPlan.
*/ */
static void static void
StoreCachedPlan(CachedPlanSource * plansource, StoreCachedPlan(CachedPlanSource *plansource,
List *stmt_list, List *stmt_list,
MemoryContext plan_context) MemoryContext plan_context)
{ {
@ -350,7 +350,7 @@ StoreCachedPlan(CachedPlanSource * plansource,
* still in use. * still in use.
*/ */
void void
DropCachedPlan(CachedPlanSource * plansource) DropCachedPlan(CachedPlanSource *plansource)
{ {
/* Validity check that we were given a CachedPlanSource */ /* Validity check that we were given a CachedPlanSource */
Assert(list_member_ptr(cached_plans_list, plansource)); Assert(list_member_ptr(cached_plans_list, plansource));
@ -393,7 +393,7 @@ DropCachedPlan(CachedPlanSource * plansource)
* is used for that work. * is used for that work.
*/ */
CachedPlan * CachedPlan *
RevalidateCachedPlan(CachedPlanSource * plansource, bool useResOwner) RevalidateCachedPlan(CachedPlanSource *plansource, bool useResOwner)
{ {
CachedPlan *plan; CachedPlan *plan;
@ -591,7 +591,7 @@ do_planning(List *querytrees, int cursorOptions)
* Portal. Transient references should be protected by a resource owner. * Portal. Transient references should be protected by a resource owner.
*/ */
void void
ReleaseCachedPlan(CachedPlan * plan, bool useResOwner) ReleaseCachedPlan(CachedPlan *plan, bool useResOwner)
{ {
if (useResOwner) if (useResOwner)
ResourceOwnerForgetPlanCacheRef(CurrentResourceOwner, plan); ResourceOwnerForgetPlanCacheRef(CurrentResourceOwner, plan);
@ -767,7 +767,7 @@ ScanQueryForRelids(Query *parsetree,
* Walker to find sublink subqueries for ScanQueryForRelids * Walker to find sublink subqueries for ScanQueryForRelids
*/ */
static bool static bool
ScanQueryWalker(Node *node, ScanQueryWalkerContext * context) ScanQueryWalker(Node *node, ScanQueryWalkerContext *context)
{ {
if (node == NULL) if (node == NULL)
return false; return false;
@ -970,7 +970,7 @@ ResetPlanCache(void)
* ScanQueryForRelids callback function for PlanCacheCallback * ScanQueryForRelids callback function for PlanCacheCallback
*/ */
static void static void
InvalRelid(Oid relid, LOCKMODE lockmode, InvalRelidContext * context) InvalRelid(Oid relid, LOCKMODE lockmode, InvalRelidContext *context)
{ {
if (relid == context->inval_relid || context->inval_relid == InvalidOid) if (relid == context->inval_relid || context->inval_relid == InvalidOid)
context->plan->dead = true; context->plan->dead = true;

View File

@ -12,7 +12,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/mmgr/portalmem.c,v 1.104 2007/11/15 21:14:41 momjian Exp $ * $PostgreSQL: pgsql/src/backend/utils/mmgr/portalmem.c,v 1.105 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -292,7 +292,7 @@ PortalDefineQuery(Portal portal,
const char *sourceText, const char *sourceText,
const char *commandTag, const char *commandTag,
List *stmts, List *stmts,
CachedPlan * cplan) CachedPlan *cplan)
{ {
AssertArg(PortalIsValid(portal)); AssertArg(PortalIsValid(portal));
AssertState(portal->status == PORTAL_NEW); AssertState(portal->status == PORTAL_NEW);

View File

@ -14,7 +14,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/resowner/resowner.c,v 1.25 2007/11/15 21:14:41 momjian Exp $ * $PostgreSQL: pgsql/src/backend/utils/resowner/resowner.c,v 1.26 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -95,7 +95,7 @@ static void ResourceOwnerReleaseInternal(ResourceOwner owner,
bool isCommit, bool isCommit,
bool isTopLevel); bool isTopLevel);
static void PrintRelCacheLeakWarning(Relation rel); static void PrintRelCacheLeakWarning(Relation rel);
static void PrintPlanCacheLeakWarning(CachedPlan * plan); static void PrintPlanCacheLeakWarning(CachedPlan *plan);
static void PrintTupleDescLeakWarning(TupleDesc tupdesc); static void PrintTupleDescLeakWarning(TupleDesc tupdesc);
@ -811,7 +811,7 @@ ResourceOwnerEnlargePlanCacheRefs(ResourceOwner owner)
* Caller must have previously done ResourceOwnerEnlargePlanCacheRefs() * Caller must have previously done ResourceOwnerEnlargePlanCacheRefs()
*/ */
void void
ResourceOwnerRememberPlanCacheRef(ResourceOwner owner, CachedPlan * plan) ResourceOwnerRememberPlanCacheRef(ResourceOwner owner, CachedPlan *plan)
{ {
Assert(owner->nplanrefs < owner->maxplanrefs); Assert(owner->nplanrefs < owner->maxplanrefs);
owner->planrefs[owner->nplanrefs] = plan; owner->planrefs[owner->nplanrefs] = plan;
@ -822,7 +822,7 @@ ResourceOwnerRememberPlanCacheRef(ResourceOwner owner, CachedPlan * plan)
* Forget that a plancache reference is owned by a ResourceOwner * Forget that a plancache reference is owned by a ResourceOwner
*/ */
void void
ResourceOwnerForgetPlanCacheRef(ResourceOwner owner, CachedPlan * plan) ResourceOwnerForgetPlanCacheRef(ResourceOwner owner, CachedPlan *plan)
{ {
CachedPlan **planrefs = owner->planrefs; CachedPlan **planrefs = owner->planrefs;
int np1 = owner->nplanrefs - 1; int np1 = owner->nplanrefs - 1;
@ -849,7 +849,7 @@ ResourceOwnerForgetPlanCacheRef(ResourceOwner owner, CachedPlan * plan)
* Debugging subroutine * Debugging subroutine
*/ */
static void static void
PrintPlanCacheLeakWarning(CachedPlan * plan) PrintPlanCacheLeakWarning(CachedPlan *plan)
{ {
elog(WARNING, "plancache reference leak: plan %p not closed", plan); elog(WARNING, "plancache reference leak: plan %p not closed", plan);
} }

View File

@ -34,7 +34,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/time/combocid.c,v 1.2 2007/11/15 21:14:41 momjian Exp $ * $PostgreSQL: pgsql/src/backend/utils/time/combocid.c,v 1.3 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -56,7 +56,7 @@ typedef struct
{ {
CommandId cmin; CommandId cmin;
CommandId cmax; CommandId cmax;
} ComboCidKeyData; } ComboCidKeyData;
typedef ComboCidKeyData *ComboCidKey; typedef ComboCidKeyData *ComboCidKey;
@ -64,7 +64,7 @@ typedef struct
{ {
ComboCidKeyData key; ComboCidKeyData key;
CommandId combocid; CommandId combocid;
} ComboCidEntryData; } ComboCidEntryData;
typedef ComboCidEntryData *ComboCidEntry; typedef ComboCidEntryData *ComboCidEntry;

View File

@ -11,7 +11,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/bin/pg_dump/common.c,v 1.100 2007/11/15 21:14:41 momjian Exp $ * $PostgreSQL: pgsql/src/bin/pg_dump/common.c,v 1.101 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -916,7 +916,7 @@ strInArray(const char *pattern, char **arr, int arr_size)
*/ */
void void
simple_oid_list_append(SimpleOidList * list, Oid val) simple_oid_list_append(SimpleOidList *list, Oid val)
{ {
SimpleOidListCell *cell; SimpleOidListCell *cell;
@ -932,7 +932,7 @@ simple_oid_list_append(SimpleOidList * list, Oid val)
} }
void void
simple_string_list_append(SimpleStringList * list, const char *val) simple_string_list_append(SimpleStringList *list, const char *val)
{ {
SimpleStringListCell *cell; SimpleStringListCell *cell;
@ -950,7 +950,7 @@ simple_string_list_append(SimpleStringList * list, const char *val)
} }
bool bool
simple_oid_list_member(SimpleOidList * list, Oid val) simple_oid_list_member(SimpleOidList *list, Oid val)
{ {
SimpleOidListCell *cell; SimpleOidListCell *cell;
@ -963,7 +963,7 @@ simple_oid_list_member(SimpleOidList * list, Oid val)
} }
bool bool
simple_string_list_member(SimpleStringList * list, const char *val) simple_string_list_member(SimpleStringList *list, const char *val)
{ {
SimpleStringListCell *cell; SimpleStringListCell *cell;

View File

@ -12,7 +12,7 @@
* by PostgreSQL * by PostgreSQL
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.476 2007/11/15 21:14:41 momjian Exp $ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.477 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -120,10 +120,10 @@ static int disable_dollar_quoting = 0;
static void help(const char *progname); static void help(const char *progname);
static void expand_schema_name_patterns(SimpleStringList * patterns, static void expand_schema_name_patterns(SimpleStringList *patterns,
SimpleOidList * oids); SimpleOidList *oids);
static void expand_table_name_patterns(SimpleStringList * patterns, static void expand_table_name_patterns(SimpleStringList *patterns,
SimpleOidList * oids); SimpleOidList *oids);
static NamespaceInfo *findNamespace(Oid nsoid, Oid objoid); static NamespaceInfo *findNamespace(Oid nsoid, Oid objoid);
static void dumpTableData(Archive *fout, TableDataInfo *tdinfo); static void dumpTableData(Archive *fout, TableDataInfo *tdinfo);
static void dumpComment(Archive *fout, const char *target, static void dumpComment(Archive *fout, const char *target,
@ -145,7 +145,7 @@ static void dumpFunc(Archive *fout, FuncInfo *finfo);
static void dumpCast(Archive *fout, CastInfo *cast); static void dumpCast(Archive *fout, CastInfo *cast);
static void dumpOpr(Archive *fout, OprInfo *oprinfo); static void dumpOpr(Archive *fout, OprInfo *oprinfo);
static void dumpOpclass(Archive *fout, OpclassInfo *opcinfo); static void dumpOpclass(Archive *fout, OpclassInfo *opcinfo);
static void dumpOpfamily(Archive *fout, OpfamilyInfo * opfinfo); static void dumpOpfamily(Archive *fout, OpfamilyInfo *opfinfo);
static void dumpConversion(Archive *fout, ConvInfo *convinfo); static void dumpConversion(Archive *fout, ConvInfo *convinfo);
static void dumpRule(Archive *fout, RuleInfo *rinfo); static void dumpRule(Archive *fout, RuleInfo *rinfo);
static void dumpAgg(Archive *fout, AggInfo *agginfo); static void dumpAgg(Archive *fout, AggInfo *agginfo);
@ -157,10 +157,10 @@ static void dumpSequence(Archive *fout, TableInfo *tbinfo);
static void dumpIndex(Archive *fout, IndxInfo *indxinfo); static void dumpIndex(Archive *fout, IndxInfo *indxinfo);
static void dumpConstraint(Archive *fout, ConstraintInfo *coninfo); static void dumpConstraint(Archive *fout, ConstraintInfo *coninfo);
static void dumpTableConstraintComment(Archive *fout, ConstraintInfo *coninfo); static void dumpTableConstraintComment(Archive *fout, ConstraintInfo *coninfo);
static void dumpTSParser(Archive *fout, TSParserInfo * prsinfo); static void dumpTSParser(Archive *fout, TSParserInfo *prsinfo);
static void dumpTSDictionary(Archive *fout, TSDictInfo * dictinfo); static void dumpTSDictionary(Archive *fout, TSDictInfo *dictinfo);
static void dumpTSTemplate(Archive *fout, TSTemplateInfo * tmplinfo); static void dumpTSTemplate(Archive *fout, TSTemplateInfo *tmplinfo);
static void dumpTSConfig(Archive *fout, TSConfigInfo * cfginfo); static void dumpTSConfig(Archive *fout, TSConfigInfo *cfginfo);
static void dumpACL(Archive *fout, CatalogId objCatId, DumpId objDumpId, static void dumpACL(Archive *fout, CatalogId objCatId, DumpId objDumpId,
const char *type, const char *name, const char *type, const char *name,
@ -795,7 +795,7 @@ exit_nicely(void)
* and append them to the given OID list. * and append them to the given OID list.
*/ */
static void static void
expand_schema_name_patterns(SimpleStringList * patterns, SimpleOidList * oids) expand_schema_name_patterns(SimpleStringList *patterns, SimpleOidList *oids)
{ {
PQExpBuffer query; PQExpBuffer query;
PGresult *res; PGresult *res;
@ -846,7 +846,7 @@ expand_schema_name_patterns(SimpleStringList * patterns, SimpleOidList * oids)
* and append them to the given OID list. * and append them to the given OID list.
*/ */
static void static void
expand_table_name_patterns(SimpleStringList * patterns, SimpleOidList * oids) expand_table_name_patterns(SimpleStringList *patterns, SimpleOidList *oids)
{ {
PQExpBuffer query; PQExpBuffer query;
PGresult *res; PGresult *res;
@ -7590,7 +7590,7 @@ dumpOpclass(Archive *fout, OpclassInfo *opcinfo)
* write out a single operator family definition * write out a single operator family definition
*/ */
static void static void
dumpOpfamily(Archive *fout, OpfamilyInfo * opfinfo) dumpOpfamily(Archive *fout, OpfamilyInfo *opfinfo)
{ {
PQExpBuffer query; PQExpBuffer query;
PQExpBuffer q; PQExpBuffer q;
@ -8219,7 +8219,7 @@ dumpAgg(Archive *fout, AggInfo *agginfo)
* write out a single text search parser * write out a single text search parser
*/ */
static void static void
dumpTSParser(Archive *fout, TSParserInfo * prsinfo) dumpTSParser(Archive *fout, TSParserInfo *prsinfo)
{ {
PQExpBuffer q; PQExpBuffer q;
PQExpBuffer delq; PQExpBuffer delq;
@ -8283,7 +8283,7 @@ dumpTSParser(Archive *fout, TSParserInfo * prsinfo)
* write out a single text search dictionary * write out a single text search dictionary
*/ */
static void static void
dumpTSDictionary(Archive *fout, TSDictInfo * dictinfo) dumpTSDictionary(Archive *fout, TSDictInfo *dictinfo)
{ {
PQExpBuffer q; PQExpBuffer q;
PQExpBuffer delq; PQExpBuffer delq;
@ -8373,7 +8373,7 @@ dumpTSDictionary(Archive *fout, TSDictInfo * dictinfo)
* write out a single text search template * write out a single text search template
*/ */
static void static void
dumpTSTemplate(Archive *fout, TSTemplateInfo * tmplinfo) dumpTSTemplate(Archive *fout, TSTemplateInfo *tmplinfo)
{ {
PQExpBuffer q; PQExpBuffer q;
PQExpBuffer delq; PQExpBuffer delq;
@ -8431,7 +8431,7 @@ dumpTSTemplate(Archive *fout, TSTemplateInfo * tmplinfo)
* write out a single text search configuration * write out a single text search configuration
*/ */
static void static void
dumpTSConfig(Archive *fout, TSConfigInfo * cfginfo) dumpTSConfig(Archive *fout, TSConfigInfo *cfginfo)
{ {
PQExpBuffer q; PQExpBuffer q;
PQExpBuffer delq; PQExpBuffer delq;

View File

@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.h,v 1.137 2007/11/15 21:14:42 momjian Exp $ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.h,v 1.138 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -69,25 +69,25 @@ typedef struct SimpleOidListCell
{ {
struct SimpleOidListCell *next; struct SimpleOidListCell *next;
Oid val; Oid val;
} SimpleOidListCell; } SimpleOidListCell;
typedef struct SimpleOidList typedef struct SimpleOidList
{ {
SimpleOidListCell *head; SimpleOidListCell *head;
SimpleOidListCell *tail; SimpleOidListCell *tail;
} SimpleOidList; } SimpleOidList;
typedef struct SimpleStringListCell typedef struct SimpleStringListCell
{ {
struct SimpleStringListCell *next; struct SimpleStringListCell *next;
char val[1]; /* VARIABLE LENGTH FIELD */ char val[1]; /* VARIABLE LENGTH FIELD */
} SimpleStringListCell; } SimpleStringListCell;
typedef struct SimpleStringList typedef struct SimpleStringList
{ {
SimpleStringListCell *head; SimpleStringListCell *head;
SimpleStringListCell *tail; SimpleStringListCell *tail;
} SimpleStringList; } SimpleStringList;
/* /*
* The data structures used to store system catalog information. Every * The data structures used to store system catalog information. Every
@ -219,7 +219,7 @@ typedef struct _opfamilyInfo
{ {
DumpableObject dobj; DumpableObject dobj;
char *rolname; char *rolname;
} OpfamilyInfo; } OpfamilyInfo;
typedef struct _convInfo typedef struct _convInfo
{ {
@ -391,7 +391,7 @@ typedef struct _prsInfo
Oid prsend; Oid prsend;
Oid prsheadline; Oid prsheadline;
Oid prslextype; Oid prslextype;
} TSParserInfo; } TSParserInfo;
typedef struct _dictInfo typedef struct _dictInfo
{ {
@ -399,21 +399,21 @@ typedef struct _dictInfo
char *rolname; char *rolname;
Oid dicttemplate; Oid dicttemplate;
char *dictinitoption; char *dictinitoption;
} TSDictInfo; } TSDictInfo;
typedef struct _tmplInfo typedef struct _tmplInfo
{ {
DumpableObject dobj; DumpableObject dobj;
Oid tmplinit; Oid tmplinit;
Oid tmpllexize; Oid tmpllexize;
} TSTemplateInfo; } TSTemplateInfo;
typedef struct _cfgInfo typedef struct _cfgInfo
{ {
DumpableObject dobj; DumpableObject dobj;
char *rolname; char *rolname;
Oid cfgparser; Oid cfgparser;
} TSConfigInfo; } TSConfigInfo;
/* global decls */ /* global decls */
extern bool force_quotes; /* double-quotes for identifiers flag */ extern bool force_quotes; /* double-quotes for identifiers flag */
@ -454,10 +454,10 @@ extern TypeInfo *findTypeByOid(Oid oid);
extern FuncInfo *findFuncByOid(Oid oid); extern FuncInfo *findFuncByOid(Oid oid);
extern OprInfo *findOprByOid(Oid oid); extern OprInfo *findOprByOid(Oid oid);
extern void simple_oid_list_append(SimpleOidList * list, Oid val); extern void simple_oid_list_append(SimpleOidList *list, Oid val);
extern void simple_string_list_append(SimpleStringList * list, const char *val); extern void simple_string_list_append(SimpleStringList *list, const char *val);
extern bool simple_oid_list_member(SimpleOidList * list, Oid val); extern bool simple_oid_list_member(SimpleOidList *list, Oid val);
extern bool simple_string_list_member(SimpleStringList * list, const char *val); extern bool simple_string_list_member(SimpleStringList *list, const char *val);
extern char *pg_strdup(const char *string); extern char *pg_strdup(const char *string);
extern void *pg_malloc(size_t size); extern void *pg_malloc(size_t size);

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/include/access/htup.h,v 1.96 2007/11/15 21:14:42 momjian Exp $ * $PostgreSQL: pgsql/src/include/access/htup.h,v 1.97 2007/11/15 22:25:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -714,7 +714,7 @@ typedef struct xl_heap_freeze
BlockNumber block; BlockNumber block;
TransactionId cutoff_xid; TransactionId cutoff_xid;
/* TUPLE OFFSET NUMBERS FOLLOW AT THE END */ /* TUPLE OFFSET NUMBERS FOLLOW AT THE END */
} xl_heap_freeze; } xl_heap_freeze;
#define SizeOfHeapFreeze (offsetof(xl_heap_freeze, cutoff_xid) + sizeof(TransactionId)) #define SizeOfHeapFreeze (offsetof(xl_heap_freeze, cutoff_xid) + sizeof(TransactionId))

View File

@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/include/access/xlog.h,v 1.85 2007/11/15 21:14:42 momjian Exp $ * $PostgreSQL: pgsql/src/include/access/xlog.h,v 1.86 2007/11/15 22:25:17 momjian Exp $
*/ */
#ifndef XLOG_H #ifndef XLOG_H
#define XLOG_H #define XLOG_H
@ -182,7 +182,7 @@ typedef struct CheckpointStatsData
int ckpt_segs_added; /* # of new xlog segments created */ int ckpt_segs_added; /* # of new xlog segments created */
int ckpt_segs_removed; /* # of xlog segments deleted */ int ckpt_segs_removed; /* # of xlog segments deleted */
int ckpt_segs_recycled; /* # of xlog segments recycled */ int ckpt_segs_recycled; /* # of xlog segments recycled */
} CheckpointStatsData; } CheckpointStatsData;
extern CheckpointStatsData CheckpointStats; extern CheckpointStatsData CheckpointStats;

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/include/bootstrap/bootstrap.h,v 1.48 2007/11/15 21:14:42 momjian Exp $ * $PostgreSQL: pgsql/src/include/bootstrap/bootstrap.h,v 1.49 2007/11/15 22:25:17 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -71,6 +71,6 @@ typedef enum
StartupProcess, StartupProcess,
BgWriterProcess, BgWriterProcess,
WalWriterProcess WalWriterProcess
} AuxProcType; } AuxProcType;
#endif /* BOOTSTRAP_H */ #endif /* BOOTSTRAP_H */

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/include/catalog/namespace.h,v 1.50 2007/11/15 21:14:42 momjian Exp $ * $PostgreSQL: pgsql/src/include/catalog/namespace.h,v 1.51 2007/11/15 22:25:17 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -40,7 +40,7 @@ typedef struct OverrideSearchPath
List *schemas; /* OIDs of explicitly named schemas */ List *schemas; /* OIDs of explicitly named schemas */
bool addCatalog; /* implicitly prepend pg_catalog? */ bool addCatalog; /* implicitly prepend pg_catalog? */
bool addTemp; /* implicitly prepend temp schema? */ bool addTemp; /* implicitly prepend temp schema? */
} OverrideSearchPath; } OverrideSearchPath;
extern Oid RangeVarGetRelid(const RangeVar *relation, bool failOK); extern Oid RangeVarGetRelid(const RangeVar *relation, bool failOK);
@ -99,7 +99,7 @@ extern Oid GetTempToastNamespace(void);
extern void ResetTempTableNamespace(void); extern void ResetTempTableNamespace(void);
extern OverrideSearchPath *GetOverrideSearchPath(MemoryContext context); extern OverrideSearchPath *GetOverrideSearchPath(MemoryContext context);
extern void PushOverrideSearchPath(OverrideSearchPath * newpath); extern void PushOverrideSearchPath(OverrideSearchPath *newpath);
extern void PopOverrideSearchPath(void); extern void PopOverrideSearchPath(void);
extern Oid FindConversionByName(List *conname); extern Oid FindConversionByName(List *conname);

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/include/commands/defrem.h,v 1.85 2007/11/15 21:14:43 momjian Exp $ * $PostgreSQL: pgsql/src/include/commands/defrem.h,v 1.86 2007/11/15 22:25:17 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -79,10 +79,10 @@ extern void AlterAggregateOwner(List *name, List *args, Oid newOwnerId);
/* commands/opclasscmds.c */ /* commands/opclasscmds.c */
extern void DefineOpClass(CreateOpClassStmt *stmt); extern void DefineOpClass(CreateOpClassStmt *stmt);
extern void DefineOpFamily(CreateOpFamilyStmt * stmt); extern void DefineOpFamily(CreateOpFamilyStmt *stmt);
extern void AlterOpFamily(AlterOpFamilyStmt * stmt); extern void AlterOpFamily(AlterOpFamilyStmt *stmt);
extern void RemoveOpClass(RemoveOpClassStmt *stmt); extern void RemoveOpClass(RemoveOpClassStmt *stmt);
extern void RemoveOpFamily(RemoveOpFamilyStmt * stmt); extern void RemoveOpFamily(RemoveOpFamilyStmt *stmt);
extern void RemoveOpClassById(Oid opclassOid); extern void RemoveOpClassById(Oid opclassOid);
extern void RemoveOpFamilyById(Oid opfamilyOid); extern void RemoveOpFamilyById(Oid opfamilyOid);
extern void RemoveAmOpEntryById(Oid entryOid); extern void RemoveAmOpEntryById(Oid entryOid);
@ -104,7 +104,7 @@ extern void RenameTSDictionary(List *oldname, const char *newname);
extern void RemoveTSDictionary(List *names, DropBehavior behavior, extern void RemoveTSDictionary(List *names, DropBehavior behavior,
bool missing_ok); bool missing_ok);
extern void RemoveTSDictionaryById(Oid dictId); extern void RemoveTSDictionaryById(Oid dictId);
extern void AlterTSDictionary(AlterTSDictionaryStmt * stmt); extern void AlterTSDictionary(AlterTSDictionaryStmt *stmt);
extern void AlterTSDictionaryOwner(List *name, Oid newOwnerId); extern void AlterTSDictionaryOwner(List *name, Oid newOwnerId);
extern void DefineTSTemplate(List *names, List *parameters); extern void DefineTSTemplate(List *names, List *parameters);
@ -118,7 +118,7 @@ extern void RenameTSConfiguration(List *oldname, const char *newname);
extern void RemoveTSConfiguration(List *names, DropBehavior behavior, extern void RemoveTSConfiguration(List *names, DropBehavior behavior,
bool missing_ok); bool missing_ok);
extern void RemoveTSConfigurationById(Oid cfgId); extern void RemoveTSConfigurationById(Oid cfgId);
extern void AlterTSConfiguration(AlterTSConfigurationStmt * stmt); extern void AlterTSConfiguration(AlterTSConfigurationStmt *stmt);
extern void AlterTSConfigurationOwner(List *name, Oid newOwnerId); extern void AlterTSConfigurationOwner(List *name, Oid newOwnerId);
extern text *serialize_deflist(List *deflist); extern text *serialize_deflist(List *deflist);

View File

@ -6,7 +6,7 @@
* *
* Copyright (c) 1996-2007, PostgreSQL Global Development Group * Copyright (c) 1996-2007, PostgreSQL Global Development Group
* *
* $PostgreSQL: pgsql/src/include/commands/discard.h,v 1.2 2007/11/15 21:14:43 momjian Exp $ * $PostgreSQL: pgsql/src/include/commands/discard.h,v 1.3 2007/11/15 22:25:17 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -15,6 +15,6 @@
#include "nodes/parsenodes.h" #include "nodes/parsenodes.h"
extern void DiscardCommand(DiscardStmt * stmt, bool isTopLevel); extern void DiscardCommand(DiscardStmt *stmt, bool isTopLevel);
#endif /* DISCARD_H */ #endif /* DISCARD_H */

View File

@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994-5, Regents of the University of California * Portions Copyright (c) 1994-5, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/include/commands/explain.h,v 1.33 2007/11/15 21:14:43 momjian Exp $ * $PostgreSQL: pgsql/src/include/commands/explain.h,v 1.34 2007/11/15 22:25:17 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -38,7 +38,7 @@ extern void ExplainOneUtility(Node *utilityStmt, ExplainStmt *stmt,
ParamListInfo params, ParamListInfo params,
TupOutputState *tstate); TupOutputState *tstate);
extern void ExplainOnePlan(PlannedStmt * plannedstmt, ParamListInfo params, extern void ExplainOnePlan(PlannedStmt *plannedstmt, ParamListInfo params,
ExplainStmt *stmt, TupOutputState *tstate); ExplainStmt *stmt, TupOutputState *tstate);
#endif /* EXPLAIN_H */ #endif /* EXPLAIN_H */

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/include/commands/portalcmds.h,v 1.24 2007/11/15 21:14:43 momjian Exp $ * $PostgreSQL: pgsql/src/include/commands/portalcmds.h,v 1.25 2007/11/15 22:25:17 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -19,7 +19,7 @@
#include "utils/portal.h" #include "utils/portal.h"
extern void PerformCursorOpen(PlannedStmt * stmt, ParamListInfo params, extern void PerformCursorOpen(PlannedStmt *stmt, ParamListInfo params,
const char *queryString, bool isTopLevel); const char *queryString, bool isTopLevel);
extern void PerformPortalFetch(FetchStmt *stmt, DestReceiver *dest, extern void PerformPortalFetch(FetchStmt *stmt, DestReceiver *dest,

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/include/commands/typecmds.h,v 1.20 2007/11/15 21:14:43 momjian Exp $ * $PostgreSQL: pgsql/src/include/commands/typecmds.h,v 1.21 2007/11/15 22:25:17 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -24,7 +24,7 @@ extern void RemoveType(List *names, DropBehavior behavior, bool missing_ok);
extern void RemoveTypeById(Oid typeOid); extern void RemoveTypeById(Oid typeOid);
extern void DefineDomain(CreateDomainStmt *stmt); extern void DefineDomain(CreateDomainStmt *stmt);
extern void RemoveDomain(List *names, DropBehavior behavior, bool missing_ok); extern void RemoveDomain(List *names, DropBehavior behavior, bool missing_ok);
extern void DefineEnum(CreateEnumStmt * stmt); extern void DefineEnum(CreateEnumStmt *stmt);
extern Oid DefineCompositeType(const RangeVar *typevar, List *coldeflist); extern Oid DefineCompositeType(const RangeVar *typevar, List *coldeflist);
extern void AlterDomainDefault(List *names, Node *defaultRaw); extern void AlterDomainDefault(List *names, Node *defaultRaw);

View File

@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/include/executor/execdesc.h,v 1.35 2007/11/15 21:14:43 momjian Exp $ * $PostgreSQL: pgsql/src/include/executor/execdesc.h,v 1.36 2007/11/15 22:25:17 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -50,7 +50,7 @@ typedef struct QueryDesc
} QueryDesc; } QueryDesc;
/* in pquery.c */ /* in pquery.c */
extern QueryDesc *CreateQueryDesc(PlannedStmt * plannedstmt, extern QueryDesc *CreateQueryDesc(PlannedStmt *plannedstmt,
Snapshot snapshot, Snapshot snapshot,
Snapshot crosscheck_snapshot, Snapshot crosscheck_snapshot,
DestReceiver *dest, DestReceiver *dest,

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/include/executor/executor.h,v 1.143 2007/11/15 21:14:43 momjian Exp $ * $PostgreSQL: pgsql/src/include/executor/executor.h,v 1.144 2007/11/15 22:25:17 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -73,7 +73,7 @@ extern bool ExecMayReturnRawTuples(PlanState *node);
/* /*
* prototypes from functions in execCurrent.c * prototypes from functions in execCurrent.c
*/ */
extern bool execCurrentOf(CurrentOfExpr * cexpr, extern bool execCurrentOf(CurrentOfExpr *cexpr,
ExprContext *econtext, ExprContext *econtext,
Oid table_oid, Oid table_oid,
ItemPointer current_tid); ItemPointer current_tid);

View File

@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/include/mb/pg_wchar.h,v 1.76 2007/11/15 21:14:43 momjian Exp $ * $PostgreSQL: pgsql/src/include/mb/pg_wchar.h,v 1.77 2007/11/15 22:25:17 momjian Exp $
* *
* NOTES * NOTES
* This is used both by the backend and by libpq, but should not be * This is used both by the backend and by libpq, but should not be
@ -313,7 +313,7 @@ typedef struct
uint32 utf1; /* UTF-8 code 1 */ uint32 utf1; /* UTF-8 code 1 */
uint32 utf2; /* UTF-8 code 2 */ uint32 utf2; /* UTF-8 code 2 */
uint32 code; /* local code */ uint32 code; /* local code */
} pg_utf_to_local_combined; } pg_utf_to_local_combined;
/* /*
* local code to UTF-8 conversion map(combined characters) * local code to UTF-8 conversion map(combined characters)
@ -323,7 +323,7 @@ typedef struct
uint32 code; /* local code */ uint32 code; /* local code */
uint32 utf1; /* UTF-8 code 1 */ uint32 utf1; /* UTF-8 code 1 */
uint32 utf2; /* UTF-8 code 2 */ uint32 utf2; /* UTF-8 code 2 */
} pg_local_to_utf_combined; } pg_local_to_utf_combined;
/* /*
@ -387,11 +387,11 @@ extern unsigned short BIG5toCNS(unsigned short big5, unsigned char *lc);
extern unsigned short CNStoBIG5(unsigned short cns, unsigned char lc); extern unsigned short CNStoBIG5(unsigned short cns, unsigned char lc);
extern void LocalToUtf(const unsigned char *iso, unsigned char *utf, extern void LocalToUtf(const unsigned char *iso, unsigned char *utf,
const pg_local_to_utf *map, const pg_local_to_utf_combined * cmap, const pg_local_to_utf *map, const pg_local_to_utf_combined *cmap,
int size1, int size2, int encoding, int len); int size1, int size2, int encoding, int len);
extern void UtfToLocal(const unsigned char *utf, unsigned char *iso, extern void UtfToLocal(const unsigned char *utf, unsigned char *iso,
const pg_utf_to_local *map, const pg_utf_to_local_combined * cmap, const pg_utf_to_local *map, const pg_utf_to_local_combined *cmap,
int size1, int size2, int encoding, int len); int size1, int size2, int encoding, int len);
extern bool pg_verifymbstr(const char *mbstr, int len, bool noError); extern bool pg_verifymbstr(const char *mbstr, int len, bool noError);

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.180 2007/11/15 21:14:44 momjian Exp $ * $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.181 2007/11/15 22:25:17 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -658,7 +658,7 @@ typedef struct CoerceViaIOState
FmgrInfo outfunc; /* lookup info for source output function */ FmgrInfo outfunc; /* lookup info for source output function */
FmgrInfo infunc; /* lookup info for result input function */ FmgrInfo infunc; /* lookup info for result input function */
Oid intypioparam; /* argument needed for input function */ Oid intypioparam; /* argument needed for input function */
} CoerceViaIOState; } CoerceViaIOState;
/* ---------------- /* ----------------
* ArrayCoerceExprState node * ArrayCoerceExprState node
@ -672,7 +672,7 @@ typedef struct ArrayCoerceExprState
FmgrInfo elemfunc; /* lookup info for element coercion function */ FmgrInfo elemfunc; /* lookup info for element coercion function */
/* use struct pointer to avoid including array.h here */ /* use struct pointer to avoid including array.h here */
struct ArrayMapState *amstate; /* workspace for array_map */ struct ArrayMapState *amstate; /* workspace for array_map */
} ArrayCoerceExprState; } ArrayCoerceExprState;
/* ---------------- /* ----------------
* ConvertRowtypeExprState node * ConvertRowtypeExprState node
@ -784,7 +784,7 @@ typedef struct XmlExprState
List *named_args; /* ExprStates for named arguments */ List *named_args; /* ExprStates for named arguments */
FmgrInfo *named_outfuncs; /* array of output fns for named arguments */ FmgrInfo *named_outfuncs; /* array of output fns for named arguments */
List *args; /* ExprStates for other arguments */ List *args; /* ExprStates for other arguments */
} XmlExprState; } XmlExprState;
/* ---------------- /* ----------------
* NullTestState node * NullTestState node

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.355 2007/11/15 21:14:44 momjian Exp $ * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.356 2007/11/15 22:25:17 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -34,14 +34,14 @@ typedef enum SortByDir
SORTBY_ASC, SORTBY_ASC,
SORTBY_DESC, SORTBY_DESC,
SORTBY_USING /* not allowed in CREATE INDEX ... */ SORTBY_USING /* not allowed in CREATE INDEX ... */
} SortByDir; } SortByDir;
typedef enum SortByNulls typedef enum SortByNulls
{ {
SORTBY_NULLS_DEFAULT, SORTBY_NULLS_DEFAULT,
SORTBY_NULLS_FIRST, SORTBY_NULLS_FIRST,
SORTBY_NULLS_LAST SORTBY_NULLS_LAST
} SortByNulls; } SortByNulls;
/* /*
@ -464,7 +464,7 @@ typedef struct XmlSerialize
XmlOptionType xmloption; XmlOptionType xmloption;
Node *expr; Node *expr;
TypeName *typename; TypeName *typename;
} XmlSerialize; } XmlSerialize;
/**************************************************************************** /****************************************************************************
@ -1065,7 +1065,7 @@ typedef enum
VAR_SET_MULTI, /* special case for SET TRANSACTION ... */ VAR_SET_MULTI, /* special case for SET TRANSACTION ... */
VAR_RESET, /* RESET var */ VAR_RESET, /* RESET var */
VAR_RESET_ALL /* RESET ALL */ VAR_RESET_ALL /* RESET ALL */
} VariableSetKind; } VariableSetKind;
typedef struct VariableSetStmt typedef struct VariableSetStmt
{ {
@ -1397,7 +1397,7 @@ typedef struct CreateOpFamilyStmt
NodeTag type; NodeTag type;
List *opfamilyname; /* qualified name (list of Value strings) */ List *opfamilyname; /* qualified name (list of Value strings) */
char *amname; /* name of index AM opfamily is for */ char *amname; /* name of index AM opfamily is for */
} CreateOpFamilyStmt; } CreateOpFamilyStmt;
/* ---------------------- /* ----------------------
* Alter Operator Family Statement * Alter Operator Family Statement
@ -1410,7 +1410,7 @@ typedef struct AlterOpFamilyStmt
char *amname; /* name of index AM opfamily is for */ char *amname; /* name of index AM opfamily is for */
bool isDrop; /* ADD or DROP the items? */ bool isDrop; /* ADD or DROP the items? */
List *items; /* List of CreateOpClassItem nodes */ List *items; /* List of CreateOpClassItem nodes */
} AlterOpFamilyStmt; } AlterOpFamilyStmt;
/* ---------------------- /* ----------------------
* Drop Table|Sequence|View|Index|Type|Domain|Conversion|Schema Statement * Drop Table|Sequence|View|Index|Type|Domain|Conversion|Schema Statement
@ -1624,7 +1624,7 @@ typedef struct RemoveOpFamilyStmt
char *amname; /* name of index AM opfamily is for */ char *amname; /* name of index AM opfamily is for */
DropBehavior behavior; /* RESTRICT or CASCADE behavior */ DropBehavior behavior; /* RESTRICT or CASCADE behavior */
bool missing_ok; /* skip error if missing? */ bool missing_ok; /* skip error if missing? */
} RemoveOpFamilyStmt; } RemoveOpFamilyStmt;
/* ---------------------- /* ----------------------
* Alter Object Rename Statement * Alter Object Rename Statement
@ -1765,7 +1765,7 @@ typedef struct CreateEnumStmt
NodeTag type; NodeTag type;
List *typename; /* qualified name (list of Value strings) */ List *typename; /* qualified name (list of Value strings) */
List *vals; /* enum values (list of Value strings) */ List *vals; /* enum values (list of Value strings) */
} CreateEnumStmt; } CreateEnumStmt;
/* ---------------------- /* ----------------------
@ -1892,13 +1892,13 @@ typedef enum DiscardMode
DISCARD_ALL, DISCARD_ALL,
DISCARD_PLANS, DISCARD_PLANS,
DISCARD_TEMP DISCARD_TEMP
} DiscardMode; } DiscardMode;
typedef struct DiscardStmt typedef struct DiscardStmt
{ {
NodeTag type; NodeTag type;
DiscardMode target; DiscardMode target;
} DiscardStmt; } DiscardStmt;
/* ---------------------- /* ----------------------
* LOCK Statement * LOCK Statement
@ -2044,7 +2044,7 @@ typedef struct AlterTSDictionaryStmt
NodeTag type; NodeTag type;
List *dictname; /* qualified name (list of Value strings) */ List *dictname; /* qualified name (list of Value strings) */
List *options; /* List of DefElem nodes */ List *options; /* List of DefElem nodes */
} AlterTSDictionaryStmt; } AlterTSDictionaryStmt;
/* /*
* TS Configuration stmts: DefineStmt, RenameStmt and DropStmt are default * TS Configuration stmts: DefineStmt, RenameStmt and DropStmt are default
@ -2063,6 +2063,6 @@ typedef struct AlterTSConfigurationStmt
bool override; /* if true - remove old variant */ bool override; /* if true - remove old variant */
bool replace; /* if true - replace dictionary by another */ bool replace; /* if true - replace dictionary by another */
bool missing_ok; /* for DROP - skip error if missing? */ bool missing_ok; /* for DROP - skip error if missing? */
} AlterTSConfigurationStmt; } AlterTSConfigurationStmt;
#endif /* PARSENODES_H */ #endif /* PARSENODES_H */

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/include/nodes/plannodes.h,v 1.97 2007/11/15 21:14:44 momjian Exp $ * $PostgreSQL: pgsql/src/include/nodes/plannodes.h,v 1.98 2007/11/15 22:25:17 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -73,7 +73,7 @@ typedef struct PlannedStmt
List *relationOids; /* OIDs of relations the plan depends on */ List *relationOids; /* OIDs of relations the plan depends on */
int nParamExec; /* number of PARAM_EXEC Params used */ int nParamExec; /* number of PARAM_EXEC Params used */
} PlannedStmt; } PlannedStmt;
/* macro for fetching the Plan associated with a SubPlan node */ /* macro for fetching the Plan associated with a SubPlan node */
#define exec_subplan_get_plan(plannedstmt, subplan) \ #define exec_subplan_get_plan(plannedstmt, subplan) \

View File

@ -10,7 +10,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/include/nodes/primnodes.h,v 1.134 2007/11/15 21:14:44 momjian Exp $ * $PostgreSQL: pgsql/src/include/nodes/primnodes.h,v 1.135 2007/11/15 22:25:17 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -90,7 +90,7 @@ typedef struct IntoClause
List *options; /* options from WITH clause */ List *options; /* options from WITH clause */
OnCommitAction onCommit; /* what do we do at COMMIT? */ OnCommitAction onCommit; /* what do we do at COMMIT? */
char *tableSpaceName; /* table space to use, or NULL */ char *tableSpaceName; /* table space to use, or NULL */
} IntoClause; } IntoClause;
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
@ -566,7 +566,7 @@ typedef struct CoerceViaIO
Oid resulttype; /* output type of coercion */ Oid resulttype; /* output type of coercion */
/* output typmod is not stored, but is presumed -1 */ /* output typmod is not stored, but is presumed -1 */
CoercionForm coerceformat; /* how to display this node */ CoercionForm coerceformat; /* how to display this node */
} CoerceViaIO; } CoerceViaIO;
/* ---------------- /* ----------------
* ArrayCoerceExpr * ArrayCoerceExpr
@ -589,7 +589,7 @@ typedef struct ArrayCoerceExpr
int32 resulttypmod; /* output typmod (also element typmod) */ int32 resulttypmod; /* output typmod (also element typmod) */
bool isExplicit; /* conversion semantics flag to pass to func */ bool isExplicit; /* conversion semantics flag to pass to func */
CoercionForm coerceformat; /* how to display this node */ CoercionForm coerceformat; /* how to display this node */
} ArrayCoerceExpr; } ArrayCoerceExpr;
/* ---------------- /* ----------------
* ConvertRowtypeExpr * ConvertRowtypeExpr
@ -792,13 +792,13 @@ typedef enum XmlExprOp
IS_XMLROOT, /* XMLROOT(xml, version, standalone) */ IS_XMLROOT, /* XMLROOT(xml, version, standalone) */
IS_XMLSERIALIZE, /* XMLSERIALIZE(is_document, xmlval) */ IS_XMLSERIALIZE, /* XMLSERIALIZE(is_document, xmlval) */
IS_DOCUMENT /* xmlval IS DOCUMENT */ IS_DOCUMENT /* xmlval IS DOCUMENT */
} XmlExprOp; } XmlExprOp;
typedef enum typedef enum
{ {
XMLOPTION_DOCUMENT, XMLOPTION_DOCUMENT,
XMLOPTION_CONTENT XMLOPTION_CONTENT
} XmlOptionType; } XmlOptionType;
typedef struct XmlExpr typedef struct XmlExpr
{ {
@ -811,7 +811,7 @@ typedef struct XmlExpr
XmlOptionType xmloption; /* DOCUMENT or CONTENT */ XmlOptionType xmloption; /* DOCUMENT or CONTENT */
Oid type; /* target type for XMLSERIALIZE */ Oid type; /* target type for XMLSERIALIZE */
int32 typmod; int32 typmod;
} XmlExpr; } XmlExpr;
/* /*
* NullIfExpr - a NULLIF expression * NullIfExpr - a NULLIF expression
@ -933,7 +933,7 @@ typedef struct CurrentOfExpr
Index cvarno; /* RT index of target relation */ Index cvarno; /* RT index of target relation */
char *cursor_name; /* name of referenced cursor, or NULL */ char *cursor_name; /* name of referenced cursor, or NULL */
int cursor_param; /* refcursor parameter number, or 0 */ int cursor_param; /* refcursor parameter number, or 0 */
} CurrentOfExpr; } CurrentOfExpr;
/*-------------------- /*--------------------
* TargetEntry - * TargetEntry -

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/include/nodes/relation.h,v 1.149 2007/11/15 21:14:44 momjian Exp $ * $PostgreSQL: pgsql/src/include/nodes/relation.h,v 1.150 2007/11/15 22:25:17 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -75,7 +75,7 @@ typedef struct PlannerGlobal
List *relationOids; /* OIDs of relations the plan depends on */ List *relationOids; /* OIDs of relations the plan depends on */
bool transientPlan; /* redo plan when TransactionXmin changes? */ bool transientPlan; /* redo plan when TransactionXmin changes? */
} PlannerGlobal; } PlannerGlobal;
/* macro for fetching the Plan associated with a SubPlan node */ /* macro for fetching the Plan associated with a SubPlan node */
#define planner_subplan_get_plan(root, subplan) \ #define planner_subplan_get_plan(root, subplan) \
@ -477,7 +477,7 @@ typedef struct EquivalenceClass
bool ec_broken; /* failed to generate needed clauses? */ bool ec_broken; /* failed to generate needed clauses? */
Index ec_sortref; /* originating sortclause label, or 0 */ Index ec_sortref; /* originating sortclause label, or 0 */
struct EquivalenceClass *ec_merged; /* set if merged into another EC */ struct EquivalenceClass *ec_merged; /* set if merged into another EC */
} EquivalenceClass; } EquivalenceClass;
/* /*
* EquivalenceMember - one member expression of an EquivalenceClass * EquivalenceMember - one member expression of an EquivalenceClass
@ -503,7 +503,7 @@ typedef struct EquivalenceMember
bool em_is_const; /* expression is pseudoconstant? */ bool em_is_const; /* expression is pseudoconstant? */
bool em_is_child; /* derived version for a child relation? */ bool em_is_child; /* derived version for a child relation? */
Oid em_datatype; /* the "nominal type" used by the opfamily */ Oid em_datatype; /* the "nominal type" used by the opfamily */
} EquivalenceMember; } EquivalenceMember;
/* /*
* PathKeys * PathKeys
@ -530,7 +530,7 @@ typedef struct PathKey
Oid pk_opfamily; /* btree opfamily defining the ordering */ Oid pk_opfamily; /* btree opfamily defining the ordering */
int pk_strategy; /* sort direction (ASC or DESC) */ int pk_strategy; /* sort direction (ASC or DESC) */
bool pk_nulls_first; /* do NULLs come before normal values? */ bool pk_nulls_first; /* do NULLs come before normal values? */
} PathKey; } PathKey;
/* /*
* Type "Path" is used as-is for sequential-scan paths. For other * Type "Path" is used as-is for sequential-scan paths. For other
@ -995,7 +995,7 @@ typedef struct MergeScanSelCache
/* Results */ /* Results */
Selectivity leftscansel; /* scan fraction for clause left side */ Selectivity leftscansel; /* scan fraction for clause left side */
Selectivity rightscansel; /* scan fraction for clause right side */ Selectivity rightscansel; /* scan fraction for clause right side */
} MergeScanSelCache; } MergeScanSelCache;
/* /*
* Inner indexscan info. * Inner indexscan info.

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/include/optimizer/paths.h,v 1.101 2007/11/15 21:14:44 momjian Exp $ * $PostgreSQL: pgsql/src/include/optimizer/paths.h,v 1.102 2007/11/15 22:25:17 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -62,8 +62,8 @@ extern List *group_clauses_by_indexkey(IndexOptInfo *index,
Relids outer_relids, Relids outer_relids,
SaOpControl saop_control, SaOpControl saop_control,
bool *found_clause); bool *found_clause);
extern bool eclass_matches_any_index(EquivalenceClass * ec, extern bool eclass_matches_any_index(EquivalenceClass *ec,
EquivalenceMember * em, EquivalenceMember *em,
RelOptInfo *rel); RelOptInfo *rel);
extern bool match_index_to_operand(Node *operand, int indexcol, extern bool match_index_to_operand(Node *operand, int indexcol,
IndexOptInfo *index); IndexOptInfo *index);
@ -134,7 +134,7 @@ extern bool have_relevant_eclass_joinclause(PlannerInfo *root,
RelOptInfo *rel1, RelOptInfo *rel2); RelOptInfo *rel1, RelOptInfo *rel2);
extern bool has_relevant_eclass_joinclause(PlannerInfo *root, extern bool has_relevant_eclass_joinclause(PlannerInfo *root,
RelOptInfo *rel1); RelOptInfo *rel1);
extern bool eclass_useful_for_merging(EquivalenceClass * eclass, extern bool eclass_useful_for_merging(EquivalenceClass *eclass,
RelOptInfo *rel); RelOptInfo *rel);
/* /*

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/include/optimizer/planmain.h,v 1.104 2007/11/15 21:14:44 momjian Exp $ * $PostgreSQL: pgsql/src/include/optimizer/planmain.h,v 1.105 2007/11/15 22:25:17 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -93,10 +93,10 @@ extern RestrictInfo *build_implied_join_equality(Oid opno,
/* /*
* prototypes for plan/setrefs.c * prototypes for plan/setrefs.c
*/ */
extern Plan *set_plan_references(PlannerGlobal * glob, extern Plan *set_plan_references(PlannerGlobal *glob,
Plan *plan, Plan *plan,
List *rtable); List *rtable);
extern List *set_returning_clause_references(PlannerGlobal * glob, extern List *set_returning_clause_references(PlannerGlobal *glob,
List *rlist, List *rlist,
Plan *topplan, Plan *topplan,
Index resultRelation); Index resultRelation);

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/include/optimizer/planner.h,v 1.42 2007/11/15 21:14:44 momjian Exp $ * $PostgreSQL: pgsql/src/include/optimizer/planner.h,v 1.43 2007/11/15 22:25:17 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -29,7 +29,7 @@ extern PlannedStmt *planner(Query *parse, int cursorOptions,
ParamListInfo boundParams); ParamListInfo boundParams);
extern PlannedStmt *standard_planner(Query *parse, int cursorOptions, extern PlannedStmt *standard_planner(Query *parse, int cursorOptions,
ParamListInfo boundParams); ParamListInfo boundParams);
extern Plan *subquery_planner(PlannerGlobal * glob, Query *parse, extern Plan *subquery_planner(PlannerGlobal *glob, Query *parse,
Index level, double tuple_fraction, Index level, double tuple_fraction,
PlannerInfo **subroot); PlannerInfo **subroot);

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/include/parser/parse_coerce.h,v 1.72 2007/11/15 21:14:44 momjian Exp $ * $PostgreSQL: pgsql/src/include/parser/parse_coerce.h,v 1.73 2007/11/15 22:25:17 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -42,7 +42,7 @@ typedef enum CoercionPathType
COERCION_PATH_RELABELTYPE, /* binary-compatible cast, no function */ COERCION_PATH_RELABELTYPE, /* binary-compatible cast, no function */
COERCION_PATH_ARRAYCOERCE, /* need an ArrayCoerceExpr node */ COERCION_PATH_ARRAYCOERCE, /* need an ArrayCoerceExpr node */
COERCION_PATH_COERCEVIAIO /* need a CoerceViaIO node */ COERCION_PATH_COERCEVIAIO /* need a CoerceViaIO node */
} CoercionPathType; } CoercionPathType;
extern bool IsBinaryCoercible(Oid srctype, Oid targettype); extern bool IsBinaryCoercible(Oid srctype, Oid targettype);

Some files were not shown because too many files have changed in this diff Show More