diff options
Diffstat (limited to 'src/include/utils')
46 files changed, 161 insertions, 196 deletions
diff --git a/src/include/utils/acl.h b/src/include/utils/acl.h index df58c2aac25..eb227b3ea93 100644 --- a/src/include/utils/acl.h +++ b/src/include/utils/acl.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: acl.h,v 1.36 2001/06/12 16:34:27 momjian Exp $ + * $Id: acl.h,v 1.37 2001/10/25 05:50:10 momjian Exp $ * * NOTES * For backward-compatibility purposes we have to allow there @@ -149,13 +149,14 @@ typedef ArrayType IdList; #define ACL_MODECHG_ADD_CHR '+' #define ACL_MODECHG_DEL_CHR '-' #define ACL_MODECHG_EQL_CHR '=' -#define ACL_MODE_STR "arwdRxt" /* list of valid characters */ -#define ACL_MODE_INSERT_CHR 'a' /* formerly known as "append" */ -#define ACL_MODE_SELECT_CHR 'r' /* formerly known as "read" */ -#define ACL_MODE_UPDATE_CHR 'w' /* formerly known as "write" */ +#define ACL_MODE_STR "arwdRxt" /* list of valid + * characters */ +#define ACL_MODE_INSERT_CHR 'a' /* formerly known as "append" */ +#define ACL_MODE_SELECT_CHR 'r' /* formerly known as "read" */ +#define ACL_MODE_UPDATE_CHR 'w' /* formerly known as "write" */ #define ACL_MODE_DELETE_CHR 'd' #define ACL_MODE_RULE_CHR 'R' -#define ACL_MODE_REFERENCES_CHR 'x' +#define ACL_MODE_REFERENCES_CHR 'x' #define ACL_MODE_TRIGGER_CHR 't' /* result codes for pg_aclcheck */ @@ -203,8 +204,7 @@ extern int32 pg_aclcheck(char *relname, Oid userid, AclMode mode); extern bool pg_ownercheck(Oid userid, const char *name, int cacheid); extern bool pg_oper_ownercheck(Oid userid, Oid oprid); extern bool pg_func_ownercheck(Oid userid, char *funcname, - int nargs, Oid *arglist); + int nargs, Oid *arglist); extern bool pg_aggr_ownercheck(Oid userid, char *aggname, - Oid basetypeID); - + Oid basetypeID); #endif /* ACL_H */ diff --git a/src/include/utils/array.h b/src/include/utils/array.h index 99270353740..83fe685e49b 100644 --- a/src/include/utils/array.h +++ b/src/include/utils/array.h @@ -10,7 +10,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: array.h,v 1.29 2001/03/22 04:01:10 momjian Exp $ + * $Id: array.h,v 1.30 2001/10/25 05:50:10 momjian Exp $ * * NOTES * XXX the data array should be MAXALIGN'd -- currently we only INTALIGN @@ -127,5 +127,4 @@ extern void mda_get_prod(int n, int *range, int *prod); extern void mda_get_offset_values(int n, int *dist, int *prod, int *span); extern int mda_next_tuple(int n, int *curr, int *span); - #endif /* ARRAY_H */ diff --git a/src/include/utils/ascii.h b/src/include/utils/ascii.h index 15d4a6da676..cfead8bd1aa 100644 --- a/src/include/utils/ascii.h +++ b/src/include/utils/ascii.h @@ -2,7 +2,7 @@ /* ----------------------------------------------------------------------- * ascii.h * - * $Id: ascii.h,v 1.5 2001/03/22 04:01:10 momjian Exp $ + * $Id: ascii.h,v 1.6 2001/10/25 05:50:10 momjian Exp $ * * Portions Copyright (c) 1999-2000, PostgreSQL Global Development Group * @@ -22,7 +22,5 @@ extern Datum to_ascii_default(PG_FUNCTION_ARGS); extern char *pg_to_ascii(unsigned char *src, unsigned char *src_end, unsigned char *desc, int enc); - #endif /* MULTIBYTE */ - #endif /* _ASCII_H_ */ diff --git a/src/include/utils/bit.h b/src/include/utils/bit.h index 3b58e6b2f77..82df884b697 100644 --- a/src/include/utils/bit.h +++ b/src/include/utils/bit.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: bit.h,v 1.9 2001/01/24 19:43:28 momjian Exp $ + * $Id: bit.h,v 1.10 2001/10/25 05:50:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -34,5 +34,4 @@ extern void BitArrayClearBit(BitArray bitArray, BitIndex bitIndex); * True iff the bit is set (1) in a bit array. */ extern bool BitArrayBitIsSet(BitArray bitArray, BitIndex bitIndex); - #endif /* BIT_H */ diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h index 36d85aa0421..006b1286f8e 100644 --- a/src/include/utils/builtins.h +++ b/src/include/utils/builtins.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: builtins.h,v 1.168 2001/10/13 23:32:34 tgl Exp $ + * $Id: builtins.h,v 1.169 2001/10/25 05:50:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -16,7 +16,7 @@ #include "fmgr.h" #include "nodes/primnodes.h" -#include "storage/itemptr.h" /* for setLastTid() */ +#include "storage/itemptr.h" /* for setLastTid() */ /* * Defined in adt/ @@ -345,7 +345,7 @@ extern char *deparse_expression(Node *expr, List *dpcontext, extern List *deparse_context_for(char *relname, Oid relid); /* tid.c */ -extern void setLastTid(const ItemPointer tid); +extern void setLastTid(const ItemPointer tid); extern Datum tidin(PG_FUNCTION_ARGS); extern Datum tidout(PG_FUNCTION_ARGS); extern Datum tideq(PG_FUNCTION_ARGS); @@ -599,13 +599,12 @@ extern Datum pg_convert2(PG_FUNCTION_ARGS); /* format_type.c */ extern Datum format_type(PG_FUNCTION_ARGS); -extern char * format_type_be(Oid type_oid); -extern char * format_type_with_typemod(Oid type_oid, int32 typemod); +extern char *format_type_be(Oid type_oid); +extern char *format_type_with_typemod(Oid type_oid, int32 typemod); extern Datum oidvectortypes(PG_FUNCTION_ARGS); extern int32 type_maximum_size(Oid type_oid, int32 typemod); /* quote.c */ extern Datum quote_ident(PG_FUNCTION_ARGS); extern Datum quote_literal(PG_FUNCTION_ARGS); - #endif /* BUILTINS_H */ diff --git a/src/include/utils/cash.h b/src/include/utils/cash.h index 07897fb0a5c..49a70616e7b 100644 --- a/src/include/utils/cash.h +++ b/src/include/utils/cash.h @@ -45,5 +45,4 @@ extern Datum cashlarger(PG_FUNCTION_ARGS); extern Datum cashsmaller(PG_FUNCTION_ARGS); extern Datum cash_words(PG_FUNCTION_ARGS); - #endif /* CASH_H */ diff --git a/src/include/utils/catcache.h b/src/include/utils/catcache.h index 6b7a656e010..18fd9473e49 100644 --- a/src/include/utils/catcache.h +++ b/src/include/utils/catcache.h @@ -13,7 +13,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: catcache.h,v 1.34 2001/06/19 19:42:16 tgl Exp $ + * $Id: catcache.h,v 1.35 2001/10/25 05:50:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -36,7 +36,7 @@ typedef struct catcache char *cc_relname; /* name of relation the tuples come from */ char *cc_indname; /* name of index matching cache keys */ int cc_reloidattr; /* AttrNumber of relation OID, or 0 */ - bool cc_relisshared; /* is relation shared? */ + bool cc_relisshared; /* is relation shared? */ TupleDesc cc_tupdesc; /* tuple descriptor (copied from reldesc) */ int cc_ntup; /* # of tuples currently in this cache */ int cc_size; /* # of hash buckets in this cache */ @@ -53,6 +53,7 @@ typedef struct catctup int ct_magic; /* for Assert checks */ #define CT_MAGIC 0x57261502 CatCache *my_cache; /* link to owning catcache */ + /* * Each tuple in a cache is a member of two lists: one lists all the * elements in all the caches in LRU order, and the other lists just @@ -86,8 +87,8 @@ extern void CreateCacheMemoryContext(void); extern void AtEOXact_CatCache(bool isCommit); extern CatCache *InitCatCache(int id, char *relname, char *indname, - int reloidattr, - int nkeys, int *key); + int reloidattr, + int nkeys, int *key); extern HeapTuple SearchCatCache(CatCache *cache, Datum v1, Datum v2, @@ -99,7 +100,6 @@ extern void CatalogCacheFlushRelation(Oid relId); extern void CatalogCacheIdInvalidate(int cacheId, Index hashIndex, ItemPointer pointer); extern void PrepareToInvalidateCacheTuple(Relation relation, - HeapTuple tuple, - void (*function) (int, Index, ItemPointer, Oid)); - + HeapTuple tuple, + void (*function) (int, Index, ItemPointer, Oid)); #endif /* CATCACHE_H */ diff --git a/src/include/utils/date.h b/src/include/utils/date.h index 0e1aa141280..9773d40768f 100644 --- a/src/include/utils/date.h +++ b/src/include/utils/date.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: date.h,v 1.14 2001/10/18 17:30:16 thomas Exp $ + * $Id: date.h,v 1.15 2001/10/25 05:50:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -123,5 +123,4 @@ extern Datum timetz_zone(PG_FUNCTION_ARGS); extern Datum timetz_izone(PG_FUNCTION_ARGS); extern Datum timetz_pl_interval(PG_FUNCTION_ARGS); extern Datum timetz_mi_interval(PG_FUNCTION_ARGS); - #endif /* DATE_H */ diff --git a/src/include/utils/datetime.h b/src/include/utils/datetime.h index dbba5e06422..57960c7699f 100644 --- a/src/include/utils/datetime.h +++ b/src/include/utils/datetime.h @@ -9,7 +9,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: datetime.h,v 1.23 2001/10/23 20:17:27 tgl Exp $ + * $Id: datetime.h,v 1.24 2001/10/25 05:50:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -281,5 +281,4 @@ extern int DecodeUnits(int field, char *lowtoken, int *val); extern void ClearDateCache(bool); extern int j2day(int jd); - #endif /* DATETIME_H */ diff --git a/src/include/utils/datum.h b/src/include/utils/datum.h index b667495f186..7f6e1662e56 100644 --- a/src/include/utils/datum.h +++ b/src/include/utils/datum.h @@ -11,7 +11,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: datum.h,v 1.13 2001/03/22 04:01:11 momjian Exp $ + * $Id: datum.h,v 1.14 2001/10/25 05:50:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -45,5 +45,4 @@ extern void datumFree(Datum value, bool typByVal, int typLen); */ extern bool datumIsEqual(Datum value1, Datum value2, bool typByVal, int typLen); - #endif /* DATUM_H */ diff --git a/src/include/utils/dynahash.h b/src/include/utils/dynahash.h index d324722383f..549fd878c40 100644 --- a/src/include/utils/dynahash.h +++ b/src/include/utils/dynahash.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: dynahash.h,v 1.8 2001/01/24 19:43:28 momjian Exp $ + * $Id: dynahash.h,v 1.9 2001/10/25 05:50:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -15,5 +15,4 @@ #define DYNAHASH_H extern int my_log2(long num); - #endif /* DYNAHASH_H */ diff --git a/src/include/utils/dynamic_loader.h b/src/include/utils/dynamic_loader.h index 569aba644f9..cf685ba7454 100644 --- a/src/include/utils/dynamic_loader.h +++ b/src/include/utils/dynamic_loader.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: dynamic_loader.h,v 1.17 2001/02/10 02:31:29 tgl Exp $ + * $Id: dynamic_loader.h,v 1.18 2001/10/25 05:50:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -21,5 +21,4 @@ extern void *pg_dlopen(char *filename); extern PGFunction pg_dlsym(void *handle, char *funcname); extern void pg_dlclose(void *handle); extern char *pg_dlerror(void); - #endif /* DYNAMIC_LOADER_H */ diff --git a/src/include/utils/elog.h b/src/include/utils/elog.h index 4c98f4119ca..83309a285ad 100644 --- a/src/include/utils/elog.h +++ b/src/include/utils/elog.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: elog.h,v 1.27 2001/06/08 21:16:49 petere Exp $ + * $Id: elog.h,v 1.28 2001/10/25 05:50:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -33,11 +33,11 @@ extern bool Log_timestamp; extern bool Log_pid; -extern void elog(int lev, const char *fmt,...) +extern void +elog(int lev, const char *fmt,...) /* This extension allows gcc to check the format string for consistency with the supplied arguments. */ __attribute__((format(printf, 2, 3))); extern int DebugFileOpen(void); - #endif /* ELOG_H */ diff --git a/src/include/utils/exc.h b/src/include/utils/exc.h index 09b41790973..e8d90c432da 100644 --- a/src/include/utils/exc.h +++ b/src/include/utils/exc.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: exc.h,v 1.19 2001/02/10 02:31:29 tgl Exp $ + * $Id: exc.h,v 1.20 2001/10/25 05:50:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -84,5 +84,4 @@ extern void ExcRaise(Exception *excP, */ extern void ExcAbort(const Exception *excP, ExcDetail detail, ExcData data, ExcMessage message); - #endif /* EXC_H */ diff --git a/src/include/utils/excid.h b/src/include/utils/excid.h index eebab2e4f17..db1189842e6 100644 --- a/src/include/utils/excid.h +++ b/src/include/utils/excid.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: excid.h,v 1.10 2001/03/23 18:26:01 tgl Exp $ + * $Id: excid.h,v 1.11 2001/10/25 05:50:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -20,9 +20,11 @@ extern DLLIMPORT Exception BadState; extern DLLIMPORT Exception BadArg; extern DLLIMPORT Exception Unimplemented; -extern DLLIMPORT Exception CatalogFailure;/* XXX inconsistent naming style */ -extern DLLIMPORT Exception InternalError; /* XXX inconsistent naming style */ -extern DLLIMPORT Exception SemanticError; /* XXX inconsistent naming style */ -extern DLLIMPORT Exception SystemError; /* XXX inconsistent naming style */ - +extern DLLIMPORT Exception CatalogFailure; /* XXX inconsistent naming + * style */ +extern DLLIMPORT Exception InternalError; /* XXX inconsistent naming + * style */ +extern DLLIMPORT Exception SemanticError; /* XXX inconsistent naming + * style */ +extern DLLIMPORT Exception SystemError; /* XXX inconsistent naming style */ #endif /* EXCID_H */ diff --git a/src/include/utils/fcache.h b/src/include/utils/fcache.h index 7d94590feba..04a7728bb53 100644 --- a/src/include/utils/fcache.h +++ b/src/include/utils/fcache.h @@ -11,7 +11,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: fcache.h,v 1.17 2001/09/21 00:11:31 tgl Exp $ + * $Id: fcache.h,v 1.18 2001/10/25 05:50:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -27,11 +27,11 @@ * We store the fmgr lookup info to avoid recomputing it on each call. * * We also need to store argument values across calls when evaluating a - * function-returning-set. This is pretty ugly (and not re-entrant); + * function-returning-set. This is pretty ugly (and not re-entrant); * current-evaluation info should be somewhere in the econtext, not in * the querytree. As it stands, a function-returning-set can't safely be * recursive, at least not if it's in plpgsql which will try to re-use - * the querytree at multiple execution nesting levels. FIXME someday. + * the querytree at multiple execution nesting levels. FIXME someday. */ typedef struct FunctionCache @@ -66,5 +66,4 @@ typedef struct FunctionCache extern FunctionCachePtr init_fcache(Oid foid, int nargs, MemoryContext fcacheCxt); - #endif /* FCACHE_H */ diff --git a/src/include/utils/fmgrtab.h b/src/include/utils/fmgrtab.h index 34411e33305..afef186e274 100644 --- a/src/include/utils/fmgrtab.h +++ b/src/include/utils/fmgrtab.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: fmgrtab.h,v 1.16 2001/03/22 04:01:12 momjian Exp $ + * $Id: fmgrtab.h,v 1.17 2001/10/25 05:50:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -35,6 +35,5 @@ typedef struct extern const FmgrBuiltin fmgr_builtins[]; -extern const int fmgr_nbuiltins;/* number of entries in table */ - +extern const int fmgr_nbuiltins; /* number of entries in table */ #endif /* FMGRTAB_H */ diff --git a/src/include/utils/formatting.h b/src/include/utils/formatting.h index 14d3f578ab3..2fd297c9780 100644 --- a/src/include/utils/formatting.h +++ b/src/include/utils/formatting.h @@ -2,7 +2,7 @@ /* ----------------------------------------------------------------------- * formatting.h * - * $Id: formatting.h,v 1.9 2001/09/28 08:09:14 thomas Exp $ + * $Id: formatting.h,v 1.10 2001/10/25 05:50:10 momjian Exp $ * * * Portions Copyright (c) 1999-2000, PostgreSQL Global Development Group @@ -32,5 +32,4 @@ extern Datum int4_to_char(PG_FUNCTION_ARGS); extern Datum int8_to_char(PG_FUNCTION_ARGS); extern Datum float4_to_char(PG_FUNCTION_ARGS); extern Datum float8_to_char(PG_FUNCTION_ARGS); - #endif diff --git a/src/include/utils/geo_decls.h b/src/include/utils/geo_decls.h index 99a0524accd..7518c351be0 100644 --- a/src/include/utils/geo_decls.h +++ b/src/include/utils/geo_decls.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: geo_decls.h,v 1.34 2001/03/22 04:01:12 momjian Exp $ + * $Id: geo_decls.h,v 1.35 2001/10/25 05:50:10 momjian Exp $ * * NOTE * These routines do *not* use the float types from adt/. @@ -397,5 +397,4 @@ extern Datum positionsel(PG_FUNCTION_ARGS); extern Datum positionjoinsel(PG_FUNCTION_ARGS); extern Datum contsel(PG_FUNCTION_ARGS); extern Datum contjoinsel(PG_FUNCTION_ARGS); - #endif /* GEO_DECLS_H */ diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h index 176fa7c8933..ecb883d105e 100644 --- a/src/include/utils/guc.h +++ b/src/include/utils/guc.h @@ -4,7 +4,7 @@ * External declarations pertaining to backend/utils/misc/guc.c and * backend/utils/misc/guc-file.l * - * $Id: guc.h,v 1.10 2001/09/30 20:16:21 tgl Exp $ + * $Id: guc.h,v 1.11 2001/10/25 05:50:10 momjian Exp $ */ #ifndef GUC_H #define GUC_H @@ -39,22 +39,22 @@ */ typedef enum { - PGC_POSTMASTER, - PGC_SIGHUP, - PGC_BACKEND, - PGC_SUSET, - PGC_USERSET + PGC_POSTMASTER, + PGC_SIGHUP, + PGC_BACKEND, + PGC_SUSET, + PGC_USERSET } GucContext; extern void SetConfigOption(const char *name, const char *value, - GucContext context, bool makeDefault); + GucContext context, bool makeDefault); extern const char *GetConfigOption(const char *name); extern void ProcessConfigFile(GucContext context); extern void ResetAllOptions(bool isStartup); extern void ParseLongOption(const char *string, char **name, char **value); extern bool set_config_option(const char *name, const char *value, - GucContext context, bool DoIt, bool makeDefault); + GucContext context, bool DoIt, bool makeDefault); extern void ShowAllGUCConfig(void); @@ -72,5 +72,4 @@ extern bool Show_btree_build_stats; extern bool SQL_inheritance; extern bool Australian_timezones; - #endif /* GUC_H */ diff --git a/src/include/utils/hsearch.h b/src/include/utils/hsearch.h index 79f3296f123..78ecc485caf 100644 --- a/src/include/utils/hsearch.h +++ b/src/include/utils/hsearch.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: hsearch.h,v 1.22 2001/10/05 17:28:13 tgl Exp $ + * $Id: hsearch.h,v 1.23 2001/10/25 05:50:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -31,9 +31,9 @@ * tables, the initial directory size can be left at the default. */ #define DEF_SEGSIZE 256 -#define DEF_SEGSIZE_SHIFT 8 /* must be log2(DEF_SEGSIZE) */ +#define DEF_SEGSIZE_SHIFT 8/* must be log2(DEF_SEGSIZE) */ #define DEF_DIRSIZE 256 -#define DEF_FFACTOR 1 /* default fill factor */ +#define DEF_FFACTOR 1/* default fill factor */ #define PRIME1 37 /* for the hash function */ #define PRIME2 1048583 @@ -84,11 +84,12 @@ typedef struct HASHHDR */ typedef struct HTAB { - HASHHDR *hctl; /* shared control information */ + HASHHDR *hctl; /* shared control information */ HASHSEGMENT *dir; /* directory of segment starts */ - long (*hash) (void *key, int keysize); /* Hash Function */ - void *(*alloc) (Size);/* memory allocator */ - MemoryContext hcxt; /* memory context if default allocator used */ + long (*hash) (void *key, int keysize); /* Hash Function */ + void *(*alloc) (Size); /* memory allocator */ + MemoryContext hcxt; /* memory context if default allocator + * used */ char *tabname; /* table name (for error messages) */ bool isshared; /* true if table is in shared memory */ } HTAB; @@ -100,14 +101,14 @@ typedef struct HASHCTL long ssize; /* Segment Size */ long dsize; /* (initial) Directory Size */ long ffactor; /* Fill factor */ - long (*hash) (void *key, int keysize); /* Hash Function */ + long (*hash) (void *key, int keysize); /* Hash Function */ long keysize; /* hash key length in bytes */ long entrysize; /* total user element size in bytes */ long max_dsize; /* limit to dsize if directory size is * limited */ - void *(*alloc) (Size);/* memory allocation function */ + void *(*alloc) (Size); /* memory allocation function */ HASHSEGMENT *dir; /* directory of segment starts */ - HASHHDR *hctl; /* location of header in shared mem */ + HASHHDR *hctl; /* location of header in shared mem */ MemoryContext hcxt; /* memory context to use for allocations */ } HASHCTL; @@ -131,11 +132,11 @@ typedef struct HASHCTL /* hash_search operations */ typedef enum { - HASH_FIND, - HASH_ENTER, - HASH_REMOVE, - HASH_FIND_SAVE, - HASH_REMOVE_SAVED + HASH_FIND, + HASH_ENTER, + HASH_REMOVE, + HASH_FIND_SAVE, + HASH_REMOVE_SAVED } HASHACTION; /* hash_seq status (should be considered an opaque type by callers) */ @@ -150,7 +151,7 @@ typedef struct * prototypes for functions in dynahash.c */ extern HTAB *hash_create(const char *tabname, long nelem, - HASHCTL *info, int flags); + HASHCTL *info, int flags); extern void hash_destroy(HTAB *hashp); extern void hash_stats(const char *where, HTAB *hashp); extern void *hash_search(HTAB *hashp, void *keyPtr, HASHACTION action, @@ -165,5 +166,4 @@ extern long hash_select_dirsize(long num_entries); */ extern long string_hash(void *key, int keysize); extern long tag_hash(void *key, int keysize); - #endif /* HSEARCH_H */ diff --git a/src/include/utils/inet.h b/src/include/utils/inet.h index acb71e60028..9d0b990defe 100644 --- a/src/include/utils/inet.h +++ b/src/include/utils/inet.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: inet.h,v 1.10 2001/03/22 04:01:12 momjian Exp $ + * $Id: inet.h,v 1.11 2001/10/25 05:50:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -67,5 +67,4 @@ typedef struct macaddr #define PG_GETARG_MACADDR_P(n) DatumGetMacaddrP(PG_GETARG_DATUM(n)) #define PG_RETURN_MACADDR_P(x) return MacaddrPGetDatum(x) - #endif /* INET_H */ diff --git a/src/include/utils/int8.h b/src/include/utils/int8.h index 849b148060a..161bb838443 100644 --- a/src/include/utils/int8.h +++ b/src/include/utils/int8.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: int8.h,v 1.27 2001/08/14 22:21:59 tgl Exp $ + * $Id: int8.h,v 1.28 2001/10/25 05:50:10 momjian Exp $ * * NOTES * These data types are supported on all 64-bit architectures, and may @@ -103,5 +103,4 @@ extern Datum dtoi8(PG_FUNCTION_ARGS); extern Datum int8_text(PG_FUNCTION_ARGS); extern Datum text_int8(PG_FUNCTION_ARGS); - #endif /* INT8_H */ diff --git a/src/include/utils/inval.h b/src/include/utils/inval.h index d6277e27e1b..bc5b8d7fbe2 100644 --- a/src/include/utils/inval.h +++ b/src/include/utils/inval.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: inval.h,v 1.20 2001/06/19 19:42:16 tgl Exp $ + * $Id: inval.h,v 1.21 2001/10/25 05:50:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -26,5 +26,4 @@ extern void CommandEndInvalidationMessages(bool isCommit); extern void RelationInvalidateHeapTuple(Relation relation, HeapTuple tuple); extern void RelationMark4RollbackHeapTuple(Relation relation, HeapTuple tuple); - #endif /* INVAL_H */ diff --git a/src/include/utils/logtape.h b/src/include/utils/logtape.h index afc8dc0b6f4..960a2d3abec 100644 --- a/src/include/utils/logtape.h +++ b/src/include/utils/logtape.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: logtape.h,v 1.4 2001/01/24 19:43:28 momjian Exp $ + * $Id: logtape.h,v 1.5 2001/10/25 05:50:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -38,5 +38,4 @@ extern bool LogicalTapeSeek(LogicalTapeSet *lts, int tapenum, long blocknum, int offset); extern void LogicalTapeTell(LogicalTapeSet *lts, int tapenum, long *blocknum, int *offset); - #endif /* LOGTAPE_H */ diff --git a/src/include/utils/lsyscache.h b/src/include/utils/lsyscache.h index 6b3f8a52eaa..17e9c510686 100644 --- a/src/include/utils/lsyscache.h +++ b/src/include/utils/lsyscache.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: lsyscache.h,v 1.36 2001/09/06 02:07:42 tgl Exp $ + * $Id: lsyscache.h,v 1.37 2001/10/25 05:50:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -23,7 +23,7 @@ extern Oid get_atttype(Oid relid, AttrNumber attnum); extern bool get_attisset(Oid relid, char *attname); extern int32 get_atttypmod(Oid relid, AttrNumber attnum); extern void get_atttypetypmod(Oid relid, AttrNumber attnum, - Oid *typid, int32 *typmod); + Oid *typid, int32 *typmod); extern bool opclass_is_btree(Oid opclass); extern RegProcedure get_opcode(Oid opno); extern char *get_opname(Oid opno); @@ -46,15 +46,14 @@ extern bool get_typdefault(Oid typid, Datum *defaultValue); extern int32 get_typavgwidth(Oid typid, int32 typmod); extern int32 get_attavgwidth(Oid relid, AttrNumber attnum); extern bool get_attstatsslot(HeapTuple statstuple, - Oid atttype, int32 atttypmod, - int reqkind, Oid reqop, - Datum **values, int *nvalues, - float4 **numbers, int *nnumbers); + Oid atttype, int32 atttypmod, + int reqkind, Oid reqop, + Datum **values, int *nvalues, + float4 **numbers, int *nnumbers); extern void free_attstatsslot(Oid atttype, - Datum *values, int nvalues, - float4 *numbers, int nnumbers); + Datum *values, int nvalues, + float4 *numbers, int nnumbers); extern int32 get_usesysid(const char *username); #define TypeIsToastable(typid) (get_typstorage(typid) != 'p') - #endif /* LSYSCACHE_H */ diff --git a/src/include/utils/memutils.h b/src/include/utils/memutils.h index ca8d2d78d04..263a2978306 100644 --- a/src/include/utils/memutils.h +++ b/src/include/utils/memutils.h @@ -10,7 +10,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: memutils.h,v 1.43 2001/03/22 04:01:13 momjian Exp $ + * $Id: memutils.h,v 1.44 2001/10/25 05:50:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -116,5 +116,4 @@ extern MemoryContext AllocSetContextCreate(MemoryContext parent, #define ALLOCSET_DEFAULT_INITSIZE (8 * 1024) #define ALLOCSET_DEFAULT_MAXSIZE (8 * 1024 * 1024) - #endif /* MEMUTILS_H */ diff --git a/src/include/utils/nabstime.h b/src/include/utils/nabstime.h index b7aaf0d0acb..03bb3b6e9f5 100644 --- a/src/include/utils/nabstime.h +++ b/src/include/utils/nabstime.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: nabstime.h,v 1.32 2001/10/18 17:30:16 thomas Exp $ + * $Id: nabstime.h,v 1.33 2001/10/25 05:50:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -159,5 +159,4 @@ extern Datum timeofday(PG_FUNCTION_ARGS); extern AbsoluteTime GetCurrentAbsoluteTime(void); extern AbsoluteTime GetCurrentAbsoluteTimeUsec(int *usec); extern void abstime2tm(AbsoluteTime time, int *tzp, struct tm * tm, char **tzn); - #endif /* NABSTIME_H */ diff --git a/src/include/utils/numeric.h b/src/include/utils/numeric.h index fa251c22629..1198b838ae3 100644 --- a/src/include/utils/numeric.h +++ b/src/include/utils/numeric.h @@ -5,7 +5,7 @@ * * 1998 Jan Wieck * - * $Header: /cvsroot/pgsql/src/include/utils/numeric.h,v 1.12 2001/03/22 04:01:13 momjian Exp $ + * $Header: /cvsroot/pgsql/src/include/utils/numeric.h,v 1.13 2001/10/25 05:50:10 momjian Exp $ * * ---------- */ @@ -81,5 +81,4 @@ typedef NumericData *Numeric; #define PG_GETARG_NUMERIC(n) DatumGetNumeric(PG_GETARG_DATUM(n)) #define PG_GETARG_NUMERIC_COPY(n) DatumGetNumericCopy(PG_GETARG_DATUM(n)) #define PG_RETURN_NUMERIC(x) return NumericGetDatum(x) - #endif /* _PG_NUMERIC_H_ */ diff --git a/src/include/utils/palloc.h b/src/include/utils/palloc.h index 07a7320f976..8ba9132a444 100644 --- a/src/include/utils/palloc.h +++ b/src/include/utils/palloc.h @@ -21,7 +21,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: palloc.h,v 1.16 2001/03/22 04:01:13 momjian Exp $ + * $Id: palloc.h,v 1.17 2001/10/25 05:50:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -63,5 +63,4 @@ extern char *MemoryContextStrdup(MemoryContext context, const char *string); #define pstrdup(str) MemoryContextStrdup(CurrentMemoryContext, (str)) - #endif /* PALLOC_H */ diff --git a/src/include/utils/pg_crc.h b/src/include/utils/pg_crc.h index 675859beed0..e6d4b223fc8 100644 --- a/src/include/utils/pg_crc.h +++ b/src/include/utils/pg_crc.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: pg_crc.h,v 1.3 2001/03/23 18:42:12 tgl Exp $ + * $Id: pg_crc.h,v 1.4 2001/10/25 05:50:10 momjian Exp $ */ #ifndef PG_CRC_H #define PG_CRC_H @@ -116,7 +116,5 @@ do { \ /* Constant table for CRC calculation */ extern const uint64 crc_table[]; - #endif /* INT64_IS_BUSTED */ - #endif /* PG_CRC_H */ diff --git a/src/include/utils/pg_locale.h b/src/include/utils/pg_locale.h index d6257b7654e..a2a727290a8 100644 --- a/src/include/utils/pg_locale.h +++ b/src/include/utils/pg_locale.h @@ -4,7 +4,7 @@ * The PostgreSQL locale utils. * * - * $Id: pg_locale.h,v 1.8 2001/09/29 21:16:30 tgl Exp $ + * $Id: pg_locale.h,v 1.9 2001/10/25 05:50:10 momjian Exp $ * * Portions Copyright (c) 1999-2000, PostgreSQL Global Development Group * @@ -31,16 +31,17 @@ typedef struct PG_LocaleCategories *lc_collate, *lc_monetary, *lc_messages; -} PG_LocaleCategories; +} PG_LocaleCategories; /* - * Save locale category settings into PG memory + * Save locale category settings into PG memory */ -extern void PGLC_current(PG_LocaleCategories * lc); +extern void PGLC_current(PG_LocaleCategories *lc); + /* * Free memory allocated in PGLC_current() */ -extern void PGLC_free_categories(PG_LocaleCategories * lc); +extern void PGLC_free_categories(PG_LocaleCategories *lc); /*------ * Return the POSIX lconv struct (contains number/money formatting information) @@ -51,7 +52,5 @@ extern void PGLC_free_categories(PG_LocaleCategories * lc); */ extern struct lconv *PGLC_localeconv(void); - #endif /* USE_LOCALE */ - #endif /* _PG_LOCALE_ */ diff --git a/src/include/utils/pg_lzcompress.h b/src/include/utils/pg_lzcompress.h index fd1e62a8bed..deaa8b1fb21 100644 --- a/src/include/utils/pg_lzcompress.h +++ b/src/include/utils/pg_lzcompress.h @@ -1,7 +1,7 @@ /* ---------- * pg_lzcompress.h - * - * $Header: /cvsroot/pgsql/src/include/utils/pg_lzcompress.h,v 1.5 2000/04/12 17:16:55 momjian Exp $ + * $Header: /cvsroot/pgsql/src/include/utils/pg_lzcompress.h,v 1.6 2001/10/25 05:50:10 momjian Exp $ * * Definitions for the builtin LZ compressor * ---------- @@ -227,5 +227,4 @@ int pglz_decompress(PGLZ_Header *source, char *dest); */ extern int pglz_get_next_decomp_char_from_lzdata(PGLZ_DecompState *dstate); extern int pglz_get_next_decomp_char_from_plain(PGLZ_DecompState *dstate); - #endif /* _PG_LZCOMPRESS_H_ */ diff --git a/src/include/utils/portal.h b/src/include/utils/portal.h index df3581c6537..770b27f3f32 100644 --- a/src/include/utils/portal.h +++ b/src/include/utils/portal.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: portal.h,v 1.29 2001/10/05 17:28:13 tgl Exp $ + * $Id: portal.h,v 1.30 2001/10/25 05:50:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -35,7 +35,7 @@ typedef struct PortalData bool atStart; /* T => fetch backwards is not allowed */ bool atEnd; /* T => fetch forwards is not allowed */ void (*cleanup) (Portal); /* Cleanup routine (optional) */ -} PortalData; +} PortalData; /* * PortalIsValid @@ -67,5 +67,4 @@ extern void PortalSetQuery(Portal portal, QueryDesc *queryDesc, TupleDesc attinfo, EState *state, void (*cleanup) (Portal portal)); - #endif /* PORTAL_H */ diff --git a/src/include/utils/ps_status.h b/src/include/utils/ps_status.h index fb4a52dce41..94b8e0911d2 100644 --- a/src/include/utils/ps_status.h +++ b/src/include/utils/ps_status.h @@ -4,7 +4,7 @@ * * Declarations for backend/utils/misc/ps_status.c * - * $Id: ps_status.h,v 1.20 2001/10/21 03:25:36 tgl Exp $ + * $Id: ps_status.h,v 1.21 2001/10/25 05:50:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -15,10 +15,9 @@ extern void save_ps_display_args(int argc, char *argv[]); extern void init_ps_display(const char *username, const char *dbname, - const char *host_info); + const char *host_info); extern void set_ps_display(const char *activity); extern const char *get_ps_display(void); - #endif /* PS_STATUS_H */ diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h index 9cc7a2ecb47..11c06069aa0 100644 --- a/src/include/utils/rel.h +++ b/src/include/utils/rel.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: rel.h,v 1.52 2001/10/06 23:21:44 tgl Exp $ + * $Id: rel.h,v 1.53 2001/10/25 05:50:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -64,9 +64,9 @@ typedef struct Trigger typedef struct TriggerDesc { /* - * Index data to identify which triggers are which. Since each trigger - * can appear in more than one class, for each class we provide a list - * of integer indexes into the triggers array. + * Index data to identify which triggers are which. Since each + * trigger can appear in more than one class, for each class we + * provide a list of integer indexes into the triggers array. */ #define TRIGGER_NUM_EVENT_CLASSES 4 @@ -89,12 +89,12 @@ typedef struct TriggerDesc * Same for the statistics collector data in Relation and scan data. * ---------- */ -typedef struct PgStat_Info +typedef struct PgStat_Info { - void *tabentry; - bool no_stats; - bool heap_scan_counted; - bool index_scan_counted; + void *tabentry; + bool no_stats; + bool heap_scan_counted; + bool index_scan_counted; } PgStat_Info; /* @@ -105,9 +105,9 @@ typedef struct RelationData { File rd_fd; /* open file descriptor, or -1 if none */ RelFileNode rd_node; /* file node (physical identifier) */ - BlockNumber rd_nblocks; /* number of blocks in rel */ - BlockNumber rd_targblock; /* current insertion target block, - * or InvalidBlockNumber */ + BlockNumber rd_nblocks; /* number of blocks in rel */ + BlockNumber rd_targblock; /* current insertion target block, or + * InvalidBlockNumber */ int rd_refcnt; /* reference count */ bool rd_myxactonly; /* rel uses the local buffer mgr */ bool rd_isnailed; /* rel is nailed in cache */ @@ -127,11 +127,12 @@ typedef struct RelationData MemoryContext rd_indexcxt; /* private memory cxt for this stuff */ IndexStrategy rd_istrat; /* operator strategy map */ RegProcedure *rd_support; /* OIDs of support procedures */ - struct FmgrInfo *rd_supportinfo; /* lookup info for support procedures */ + struct FmgrInfo *rd_supportinfo; /* lookup info for support + * procedures */ /* "struct FmgrInfo" avoids need to include fmgr.h here */ /* statistics collection area */ - PgStat_Info pgstat_info; + PgStat_Info pgstat_info; } RelationData; typedef RelationData *Relation; @@ -278,5 +279,4 @@ typedef Relation *RelationPtr; /* added to prevent circular dependency. bjm 1999/11/15 */ extern char *get_temp_rel_by_physicalname(const char *relname); - #endif /* REL_H */ diff --git a/src/include/utils/relcache.h b/src/include/utils/relcache.h index 861185cea9e..d4243c7c121 100644 --- a/src/include/utils/relcache.h +++ b/src/include/utils/relcache.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: relcache.h,v 1.26 2001/10/06 23:21:44 tgl Exp $ + * $Id: relcache.h,v 1.27 2001/10/25 05:50:11 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -45,9 +45,9 @@ extern void RelationCacheInitializePhase2(void); * Routine to create a relcache entry for an about-to-be-created relation */ extern Relation RelationBuildLocalRelation(const char *relname, - TupleDesc tupDesc, - Oid relid, Oid dbid, - bool nailit); + TupleDesc tupDesc, + Oid relid, Oid dbid, + bool nailit); /* * Routines for flushing/rebuilding relcache entries in various scenarios @@ -72,5 +72,4 @@ extern void DestroyDummyCaches(void); */ #define RELCACHE_INIT_FILENAME "pg_internal.init" - #endif /* RELCACHE_H */ diff --git a/src/include/utils/selfuncs.h b/src/include/utils/selfuncs.h index 9c0c7b3ac94..5a7c44a6c6b 100644 --- a/src/include/utils/selfuncs.h +++ b/src/include/utils/selfuncs.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: selfuncs.h,v 1.1 2001/06/25 21:11:45 tgl Exp $ + * $Id: selfuncs.h,v 1.2 2001/10/25 05:50:11 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -21,13 +21,13 @@ typedef enum { - Pattern_Type_Like, Pattern_Type_Like_IC, - Pattern_Type_Regex, Pattern_Type_Regex_IC + Pattern_Type_Like, Pattern_Type_Like_IC, + Pattern_Type_Regex, Pattern_Type_Regex_IC } Pattern_Type; typedef enum { - Pattern_Prefix_None, Pattern_Prefix_Partial, Pattern_Prefix_Exact + Pattern_Prefix_None, Pattern_Prefix_Partial, Pattern_Prefix_Exact } Pattern_Prefix_Status; @@ -73,5 +73,4 @@ extern Datum btcostestimate(PG_FUNCTION_ARGS); extern Datum rtcostestimate(PG_FUNCTION_ARGS); extern Datum hashcostestimate(PG_FUNCTION_ARGS); extern Datum gistcostestimate(PG_FUNCTION_ARGS); - #endif /* SELFUNCS_H */ diff --git a/src/include/utils/sets.h b/src/include/utils/sets.h index 8ecf2389a0d..b620967b01a 100644 --- a/src/include/utils/sets.h +++ b/src/include/utils/sets.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: sets.h,v 1.9 2001/01/24 19:43:29 momjian Exp $ + * $Id: sets.h,v 1.10 2001/10/25 05:50:11 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -23,5 +23,4 @@ extern Oid SetDefine(char *querystr, char *typename); extern Datum seteval(PG_FUNCTION_ARGS); - #endif /* SETS_H */ diff --git a/src/include/utils/syscache.h b/src/include/utils/syscache.h index 6a71d77bfc7..e21081cc1ef 100644 --- a/src/include/utils/syscache.h +++ b/src/include/utils/syscache.h @@ -9,7 +9,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: syscache.h,v 1.33 2001/08/21 16:36:06 tgl Exp $ + * $Id: syscache.h,v 1.34 2001/10/25 05:50:11 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -66,11 +66,10 @@ extern void ReleaseSysCache(HeapTuple tuple); extern HeapTuple SearchSysCacheCopy(int cacheId, Datum key1, Datum key2, Datum key3, Datum key4); extern bool SearchSysCacheExists(int cacheId, - Datum key1, Datum key2, Datum key3, Datum key4); + Datum key1, Datum key2, Datum key3, Datum key4); extern Oid GetSysCacheOid(int cacheId, Datum key1, Datum key2, Datum key3, Datum key4); extern Datum SysCacheGetAttr(int cacheId, HeapTuple tup, AttrNumber attributeNumber, bool *isNull); - #endif /* SYSCACHE_H */ diff --git a/src/include/utils/temprel.h b/src/include/utils/temprel.h index f503850e4e4..20dc75f9e97 100644 --- a/src/include/utils/temprel.h +++ b/src/include/utils/temprel.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: temprel.h,v 1.17 2001/06/19 12:03:41 momjian Exp $ + * $Id: temprel.h,v 1.18 2001/10/25 05:50:11 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -29,5 +29,4 @@ extern char *get_temp_rel_by_username(const char *user_relname); extern char *get_temp_rel_by_physicalname(const char *relname); #define is_temp_rel_name(relname) (get_temp_rel_by_username(relname) != NULL) - #endif /* TEMPREL_H */ diff --git a/src/include/utils/timestamp.h b/src/include/utils/timestamp.h index 1e193bed3bb..2272c33ff2d 100644 --- a/src/include/utils/timestamp.h +++ b/src/include/utils/timestamp.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: timestamp.h,v 1.21 2001/10/18 17:30:16 thomas Exp $ + * $Id: timestamp.h,v 1.22 2001/10/25 05:50:11 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -37,8 +37,10 @@ typedef double TimestampTz; typedef struct { - double time; /* all time units other than months and years */ - int32 month; /* months and years, after time for alignment */ + double time; /* all time units other than months and + * years */ + int32 month; /* months and years, after time for + * alignment */ } Interval; @@ -49,7 +51,7 @@ typedef struct * Therefore Timestamp is pass-by-reference if and only if float8 is! */ #define DatumGetTimestamp(X) ((Timestamp) DatumGetFloat8(X)) -#define DatumGetTimestampTz(X) ((TimestampTz) DatumGetFloat8(X)) +#define DatumGetTimestampTz(X) ((TimestampTz) DatumGetFloat8(X)) #define DatumGetIntervalP(X) ((Interval *) DatumGetPointer(X)) #define TimestampGetDatum(X) Float8GetDatum(X) @@ -166,9 +168,9 @@ extern Datum now(PG_FUNCTION_ARGS); /* Internal routines (not fmgr-callable) */ extern int tm2timestamp(struct tm * tm, double fsec, int *tzp, Timestamp *dt); -extern int timestamp2tm(Timestamp dt, int *tzp, struct tm * tm, - double *fsec, char **tzn); -extern void dt2time(Timestamp dt, int *hour, int *min, double *sec); +extern int timestamp2tm(Timestamp dt, int *tzp, struct tm * tm, + double *fsec, char **tzn); +extern void dt2time(Timestamp dt, int *hour, int *min, double *sec); extern int interval2tm(Interval span, struct tm * tm, float8 *fsec); extern int tm2interval(struct tm * tm, double fsec, Interval *span); @@ -178,5 +180,4 @@ extern void GetEpochTime(struct tm * tm); extern void isoweek2date(int woy, int *year, int *mon, int *mday); extern int date2isoweek(int year, int mon, int mday); - #endif /* TIMESTAMP_H */ diff --git a/src/include/utils/tqual.h b/src/include/utils/tqual.h index cc238e7457b..4ebcc094d78 100644 --- a/src/include/utils/tqual.h +++ b/src/include/utils/tqual.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: tqual.h,v 1.34 2001/08/26 16:56:03 tgl Exp $ + * $Id: tqual.h,v 1.35 2001/10/25 05:50:11 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -90,11 +90,14 @@ extern bool ReferentialIntegritySnapshotOverride; /* Result codes for HeapTupleSatisfiesVacuum */ typedef enum { - HEAPTUPLE_DEAD, /* tuple is dead and deletable */ - HEAPTUPLE_LIVE, /* tuple is live (committed, no deleter) */ - HEAPTUPLE_RECENTLY_DEAD, /* tuple is dead, but not deletable yet */ - HEAPTUPLE_INSERT_IN_PROGRESS, /* inserting xact is still in progress */ - HEAPTUPLE_DELETE_IN_PROGRESS /* deleting xact is still in progress */ + HEAPTUPLE_DEAD, /* tuple is dead and deletable */ + HEAPTUPLE_LIVE, /* tuple is live (committed, no deleter) */ + HEAPTUPLE_RECENTLY_DEAD, /* tuple is dead, but not + * deletable yet */ + HEAPTUPLE_INSERT_IN_PROGRESS, /* inserting xact is still + * in progress */ + HEAPTUPLE_DELETE_IN_PROGRESS /* deleting xact is still + * in progress */ } HTSV_Result; extern bool HeapTupleSatisfiesItself(HeapTupleHeader tuple); @@ -104,10 +107,9 @@ extern bool HeapTupleSatisfiesSnapshot(HeapTupleHeader tuple, Snapshot snapshot); extern int HeapTupleSatisfiesUpdate(HeapTuple tuple); extern HTSV_Result HeapTupleSatisfiesVacuum(HeapTupleHeader tuple, - TransactionId OldestXmin); + TransactionId OldestXmin); extern Snapshot GetSnapshotData(bool serializable); extern void SetQuerySnapshot(void); extern void FreeXactSnapshot(void); - #endif /* TQUAL_H */ diff --git a/src/include/utils/tuplesort.h b/src/include/utils/tuplesort.h index a2c4f879624..11137219288 100644 --- a/src/include/utils/tuplesort.h +++ b/src/include/utils/tuplesort.h @@ -13,7 +13,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: tuplesort.h,v 1.8 2001/06/02 19:01:52 tgl Exp $ + * $Id: tuplesort.h,v 1.9 2001/10/25 05:50:11 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -37,9 +37,9 @@ typedef struct Tuplesortstate Tuplesortstate; */ extern Tuplesortstate *tuplesort_begin_heap(TupleDesc tupDesc, - int nkeys, - Oid *sortOperators, AttrNumber *attNums, - bool randomAccess); + int nkeys, + Oid *sortOperators, AttrNumber *attNums, + bool randomAccess); extern Tuplesortstate *tuplesort_begin_index(Relation indexRel, bool enforceUnique, bool randomAccess); @@ -83,15 +83,15 @@ extern void tuplesort_restorepos(Tuplesortstate *state); */ typedef enum { - SORTFUNC_LT, /* raw "<" operator */ - SORTFUNC_REVLT, /* raw "<" operator, but reverse NULLs */ - SORTFUNC_CMP, /* -1 / 0 / 1 three-way comparator */ - SORTFUNC_REVCMP /* 1 / 0 / -1 (reversed) 3-way comparator */ + SORTFUNC_LT, /* raw "<" operator */ + SORTFUNC_REVLT, /* raw "<" operator, but reverse NULLs */ + SORTFUNC_CMP, /* -1 / 0 / 1 three-way comparator */ + SORTFUNC_REVCMP /* 1 / 0 / -1 (reversed) 3-way comparator */ } SortFunctionKind; extern void SelectSortFunction(Oid sortOperator, - RegProcedure *sortFunction, - SortFunctionKind *kind); + RegProcedure *sortFunction, + SortFunctionKind *kind); /* * Apply a sort function (by now converted to fmgr lookup form) @@ -99,7 +99,6 @@ extern void SelectSortFunction(Oid sortOperator, * NULLs and sort ordering direction properly. */ extern int32 ApplySortFunction(FmgrInfo *sortFunction, SortFunctionKind kind, - Datum datum1, bool isNull1, - Datum datum2, bool isNull2); - + Datum datum1, bool isNull1, + Datum datum2, bool isNull2); #endif /* TUPLESORT_H */ diff --git a/src/include/utils/tuplestore.h b/src/include/utils/tuplestore.h index 3e73f8fca99..39d17461085 100644 --- a/src/include/utils/tuplestore.h +++ b/src/include/utils/tuplestore.h @@ -13,7 +13,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: tuplestore.h,v 1.3 2001/03/22 04:01:15 momjian Exp $ + * $Id: tuplestore.h,v 1.4 2001/10/25 05:50:11 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -56,5 +56,4 @@ extern void tuplestore_end(Tuplestorestate *state); extern void tuplestore_rescan(Tuplestorestate *state); extern void tuplestore_markpos(Tuplestorestate *state); extern void tuplestore_restorepos(Tuplestorestate *state); - #endif /* TUPLESTORE_H */ diff --git a/src/include/utils/varbit.h b/src/include/utils/varbit.h index 35172de7be1..b4fedf18a77 100644 --- a/src/include/utils/varbit.h +++ b/src/include/utils/varbit.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: varbit.h,v 1.11 2001/05/22 16:37:17 petere Exp $ + * $Id: varbit.h,v 1.12 2001/10/25 05:50:11 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -89,5 +89,4 @@ extern Datum bitoctetlength(PG_FUNCTION_ARGS); extern Datum bitfromint4(PG_FUNCTION_ARGS); extern Datum bittoint4(PG_FUNCTION_ARGS); extern Datum bitposition(PG_FUNCTION_ARGS); - #endif |