mirror of
https://github.com/postgres/postgres.git
synced 2025-11-18 02:02:55 +03:00
pgindent run over code.
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: array.h,v 1.17 1999/05/03 23:48:25 tgl Exp $
|
||||
* $Id: array.h,v 1.18 1999/05/25 16:14:49 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* XXX the data array should be LONGALIGN'd -- notice that the array
|
||||
@@ -127,8 +127,8 @@ extern char *array_assgn(ArrayType *array, int n, int *upperIndx,
|
||||
int *lowerIndx, ArrayType *newArr, int reftype,
|
||||
int len, bool *isNull);
|
||||
extern ArrayType *array_map(ArrayType *v, Oid type,
|
||||
char * (*fn)(),
|
||||
Oid retType, int nargs, ...);
|
||||
char *(*fn) (),
|
||||
Oid retType, int nargs,...);
|
||||
extern int array_eq(ArrayType *array1, ArrayType *array2);
|
||||
extern int _LOtransfer(char **destfd, int size, int nitems, char **srcfd,
|
||||
int isSrcLO, int isDestLO);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: bit.h,v 1.5 1999/02/13 23:22:15 momjian Exp $
|
||||
* $Id: bit.h,v 1.6 1999/05/25 16:14:51 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -19,19 +19,19 @@ typedef uint32 BitIndex;
|
||||
#define BitsPerByte 8
|
||||
|
||||
/*
|
||||
* BitArraySetBit
|
||||
* BitArraySetBit
|
||||
* Sets (to 1) the value of a bit in a bit array.
|
||||
*/
|
||||
extern void BitArraySetBit(BitArray bitArray, BitIndex bitIndex);
|
||||
|
||||
/*
|
||||
* BitArrayClearBit
|
||||
* BitArrayClearBit
|
||||
* Clears (to 0) the value of a bit in a bit array.
|
||||
*/
|
||||
extern void BitArrayClearBit(BitArray bitArray, BitIndex bitIndex);
|
||||
|
||||
/*
|
||||
* BitArrayBitIsSet
|
||||
* BitArrayBitIsSet
|
||||
* True iff the bit is set (1) in a bit array.
|
||||
*/
|
||||
extern bool BitArrayBitIsSet(BitArray bitArray, BitIndex bitIndex);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: builtins.h,v 1.78 1999/05/03 19:10:31 momjian Exp $
|
||||
* $Id: builtins.h,v 1.79 1999/05/25 16:14:52 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* This should normally only be included by fmgr.h.
|
||||
@@ -63,7 +63,7 @@ extern int8 charmul(int8 arg1, int8 arg2);
|
||||
extern int8 chardiv(int8 arg1, int8 arg2);
|
||||
extern bool cideq(int8 arg1, int8 arg2);
|
||||
extern int8 text_char(text *arg1);
|
||||
extern text* char_text(int8 arg1);
|
||||
extern text *char_text(int8 arg1);
|
||||
|
||||
/* int.c */
|
||||
extern int32 int2in(char *num);
|
||||
@@ -164,7 +164,7 @@ extern void ltoa(int32 l, char *a);
|
||||
*/
|
||||
extern int32 btint2cmp(int16 a, int16 b);
|
||||
extern int32 btint4cmp(int32 a, int32 b);
|
||||
extern int32 btint8cmp(int64 *a, int64 *b);
|
||||
extern int32 btint8cmp(int64 * a, int64 * b);
|
||||
extern int32 btint24cmp(int16 a, int32 b);
|
||||
extern int32 btint42cmp(int32 a, int16 b);
|
||||
extern int32 btfloat4cmp(float32 a, float32 b);
|
||||
@@ -524,50 +524,50 @@ extern text *translate(text *string, char from, char to);
|
||||
/* acl.c */
|
||||
|
||||
/* inet_net_ntop.c */
|
||||
char *inet_net_ntop(int af, const void *src, int bits, char *dst, size_t size);
|
||||
char *inet_cidr_ntop(int af, const void *src, int bits, char *dst, size_t size);
|
||||
char *inet_net_ntop(int af, const void *src, int bits, char *dst, size_t size);
|
||||
char *inet_cidr_ntop(int af, const void *src, int bits, char *dst, size_t size);
|
||||
|
||||
/* inet_net_pton.c */
|
||||
int inet_net_pton(int af, const char *src, void *dst, size_t size);
|
||||
int inet_net_pton(int af, const char *src, void *dst, size_t size);
|
||||
|
||||
/* network.c */
|
||||
inet *inet_in(char *str);
|
||||
char *inet_out(inet * addr);
|
||||
char *inet_out(inet *addr);
|
||||
inet *cidr_in(char *str);
|
||||
char *cidr_out(inet *addr);
|
||||
bool network_lt(inet * a1, inet * a2);
|
||||
bool network_le(inet * a1, inet * a2);
|
||||
bool network_eq(inet * a1, inet * a2);
|
||||
bool network_ge(inet * a1, inet * a2);
|
||||
bool network_gt(inet * a1, inet * a2);
|
||||
bool network_ne(inet * a1, inet * a2);
|
||||
bool network_sub(inet * a1, inet * a2);
|
||||
bool network_subeq(inet * a1, inet * a2);
|
||||
bool network_sup(inet * a1, inet * a2);
|
||||
bool network_supeq(inet * a1, inet * a2);
|
||||
int4 network_cmp(inet * a1, inet * a2);
|
||||
bool network_lt(inet *a1, inet *a2);
|
||||
bool network_le(inet *a1, inet *a2);
|
||||
bool network_eq(inet *a1, inet *a2);
|
||||
bool network_ge(inet *a1, inet *a2);
|
||||
bool network_gt(inet *a1, inet *a2);
|
||||
bool network_ne(inet *a1, inet *a2);
|
||||
bool network_sub(inet *a1, inet *a2);
|
||||
bool network_subeq(inet *a1, inet *a2);
|
||||
bool network_sup(inet *a1, inet *a2);
|
||||
bool network_supeq(inet *a1, inet *a2);
|
||||
int4 network_cmp(inet *a1, inet *a2);
|
||||
|
||||
text *network_network(inet * addr);
|
||||
text *network_netmask(inet * addr);
|
||||
int4 network_masklen(inet * addr);
|
||||
text *network_broadcast(inet * addr);
|
||||
text *network_host(inet * addr);
|
||||
text *network_network(inet *addr);
|
||||
text *network_netmask(inet *addr);
|
||||
int4 network_masklen(inet *addr);
|
||||
text *network_broadcast(inet *addr);
|
||||
text *network_host(inet *addr);
|
||||
|
||||
/* mac.c */
|
||||
macaddr *macaddr_in(char *str);
|
||||
char *macaddr_out(macaddr * addr);
|
||||
bool macaddr_lt(macaddr * a1, macaddr * a2);
|
||||
bool macaddr_le(macaddr * a1, macaddr * a2);
|
||||
bool macaddr_eq(macaddr * a1, macaddr * a2);
|
||||
bool macaddr_ge(macaddr * a1, macaddr * a2);
|
||||
bool macaddr_gt(macaddr * a1, macaddr * a2);
|
||||
bool macaddr_ne(macaddr * a1, macaddr * a2);
|
||||
int4 macaddr_cmp(macaddr * a1, macaddr * a2);
|
||||
text *macaddr_manuf(macaddr * addr);
|
||||
char *macaddr_out(macaddr *addr);
|
||||
bool macaddr_lt(macaddr *a1, macaddr *a2);
|
||||
bool macaddr_le(macaddr *a1, macaddr *a2);
|
||||
bool macaddr_eq(macaddr *a1, macaddr *a2);
|
||||
bool macaddr_ge(macaddr *a1, macaddr *a2);
|
||||
bool macaddr_gt(macaddr *a1, macaddr *a2);
|
||||
bool macaddr_ne(macaddr *a1, macaddr *a2);
|
||||
int4 macaddr_cmp(macaddr *a1, macaddr *a2);
|
||||
text *macaddr_manuf(macaddr *addr);
|
||||
|
||||
/* numeric.c */
|
||||
Numeric numeric_in(char *str, int dummy, int32 typmod);
|
||||
char *numeric_out(Numeric num);
|
||||
char *numeric_out(Numeric num);
|
||||
Numeric numeric(Numeric num, int32 typmod);
|
||||
Numeric numeric_abs(Numeric num);
|
||||
Numeric numeric_sign(Numeric num);
|
||||
@@ -604,7 +604,3 @@ float64 numeric_float8(Numeric num);
|
||||
|
||||
|
||||
#endif /* BUILTINS_H */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: dt.h,v 1.39 1999/04/15 02:24:23 thomas Exp $
|
||||
* $Id: dt.h,v 1.40 1999/05/25 16:14:53 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -268,13 +268,13 @@ extern int datetime_is_epoch(double j);
|
||||
* Include check for leap year.
|
||||
*/
|
||||
|
||||
extern int day_tab[2][13];
|
||||
extern int day_tab[2][13];
|
||||
|
||||
#define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0))
|
||||
|
||||
/* Julian date support for date2j() and j2date()
|
||||
* Set the minimum year to one greater than the year of the first valid day
|
||||
* to avoid having to check year and day both. - tgl 97/05/08
|
||||
* to avoid having to check year and day both. - tgl 97/05/08
|
||||
*/
|
||||
|
||||
#define JULIAN_MINYEAR (-4713)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: geo_decls.h,v 1.22 1999/03/28 01:56:11 tgl Exp $
|
||||
* $Id: geo_decls.h,v 1.23 1999/05/25 16:14:54 momjian Exp $
|
||||
*
|
||||
* NOTE
|
||||
* These routines do *not* use the float types from adt/.
|
||||
@@ -363,6 +363,6 @@ extern double circle_dt(CIRCLE *circle1, CIRCLE *circle2);
|
||||
extern float64 areasel(Oid opid, Oid relid, AttrNumber attno,
|
||||
char *value, int32 flag);
|
||||
extern float64 areajoinsel(Oid opid, Oid relid1, AttrNumber attno1,
|
||||
Oid relid2, AttrNumber attno2);
|
||||
Oid relid2, AttrNumber attno2);
|
||||
|
||||
#endif /* GEO_DECLS_H */
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: hsearch.h,v 1.11 1999/02/22 06:16:46 tgl Exp $
|
||||
* $Id: hsearch.h,v 1.12 1999/05/25 16:14:54 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -18,7 +18,7 @@
|
||||
* Constants
|
||||
*
|
||||
* A hash table has a top-level "directory", each of whose entries points
|
||||
* to a "segment" of ssize bucket headers. The maximum number of hash
|
||||
* to a "segment" of ssize bucket headers. The maximum number of hash
|
||||
* buckets is thus dsize * ssize (but dsize may be expansible). Of course,
|
||||
* the number of records in the table can be larger, but we don't want a
|
||||
* whole lot of records per bucket or performance goes down.
|
||||
@@ -27,11 +27,11 @@
|
||||
* expanded because it must stay at a fixed address.
|
||||
*/
|
||||
#define DEF_SEGSIZE 256
|
||||
#define DEF_SEGSIZE_SHIFT 8 /* log2(SEGSIZE) */
|
||||
#define DEF_SEGSIZE_SHIFT 8/* log2(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 PRIME1 37 /* for the hash function */
|
||||
#define PRIME2 1048583
|
||||
|
||||
|
||||
@@ -64,7 +64,8 @@ typedef struct hashhdr
|
||||
long nsegs; /* Number of allocated segments */
|
||||
long keysize; /* hash key length in bytes */
|
||||
long datasize; /* elem data length in bytes */
|
||||
long max_dsize; /* 'dsize' limit if directory is fixed size */
|
||||
long max_dsize; /* 'dsize' limit if directory is fixed
|
||||
* size */
|
||||
BUCKET_INDEX freeBucketIndex;
|
||||
/* index of first free bucket */
|
||||
#ifdef HASH_STATISTICS
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: inet.h,v 1.3 1999/02/13 23:22:23 momjian Exp $
|
||||
* $Id: inet.h,v 1.4 1999/05/25 16:14:54 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -24,7 +24,7 @@ typedef struct
|
||||
unsigned char type;
|
||||
union
|
||||
{
|
||||
unsigned int ipv4_addr; /* network byte order */
|
||||
unsigned int ipv4_addr; /* network byte order */
|
||||
/* add IPV6 address type here */
|
||||
} addr;
|
||||
} inet_struct;
|
||||
@@ -42,7 +42,7 @@ typedef struct macaddr
|
||||
unsigned char d;
|
||||
unsigned char e;
|
||||
unsigned char f;
|
||||
} macaddr;
|
||||
} macaddr;
|
||||
|
||||
|
||||
typedef struct manufacturer
|
||||
@@ -51,9 +51,8 @@ typedef struct manufacturer
|
||||
unsigned char b;
|
||||
unsigned char c;
|
||||
char *name;
|
||||
} manufacturer;
|
||||
} manufacturer;
|
||||
|
||||
extern manufacturer manufacturers[];
|
||||
|
||||
#endif /* MAC_H */
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: int8.h,v 1.12 1999/03/15 01:43:05 tgl Exp $
|
||||
* $Id: int8.h,v 1.13 1999/05/25 16:14:55 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* These data types are supported on all 64-bit architectures, and may
|
||||
@@ -94,13 +94,13 @@ extern int32 int84(int64 * val);
|
||||
#if NOT_USED
|
||||
extern int64 *int28 (int16 val);
|
||||
extern int16 int82(int64 * val);
|
||||
|
||||
#endif
|
||||
|
||||
extern float64 i8tod(int64 * val);
|
||||
extern int64 *dtoi8(float64 val);
|
||||
|
||||
extern text *int8_text(int64 *val);
|
||||
extern text *int8_text(int64 * val);
|
||||
extern int64 *text_int8(text *str);
|
||||
|
||||
#endif /* INT8_H */
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: mcxt.h,v 1.14 1999/03/22 16:45:28 momjian Exp $
|
||||
* $Id: mcxt.h,v 1.15 1999/05/25 16:14:55 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -27,7 +27,7 @@ extern MemoryContext TopMemoryContext;
|
||||
|
||||
|
||||
/*
|
||||
* MaxAllocSize
|
||||
* MaxAllocSize
|
||||
* Arbitrary limit on size of allocations.
|
||||
*
|
||||
* Note:
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: memutils.h,v 1.24 1999/05/22 23:19:36 tgl Exp $
|
||||
* $Id: memutils.h,v 1.25 1999/05/25 16:14:56 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* some of the information in this file will be moved to
|
||||
@@ -133,13 +133,13 @@ extern void OrderedElemPushInto(OrderedElem elem, OrderedSet Set);
|
||||
*/
|
||||
|
||||
/*
|
||||
* AllocPointer
|
||||
* AllocPointer
|
||||
* Aligned pointer which may be a member of an allocation set.
|
||||
*/
|
||||
typedef Pointer AllocPointer;
|
||||
|
||||
/*
|
||||
* AllocMode
|
||||
* AllocMode
|
||||
* Mode of allocation for an allocation set.
|
||||
*
|
||||
* Note:
|
||||
@@ -156,56 +156,58 @@ typedef enum AllocMode
|
||||
#define DefaultAllocMode DynamicAllocMode
|
||||
|
||||
/*
|
||||
* AllocBlock
|
||||
* AllocBlock
|
||||
* Small pieces of memory are taken from bigger blocks of
|
||||
* memory with a size aligned to a power of two. These
|
||||
* pieces are not free's separately, instead they are reused
|
||||
* for the next allocation of a fitting size.
|
||||
*/
|
||||
typedef struct AllocBlockData {
|
||||
struct AllocSetData *aset;
|
||||
struct AllocBlockData *next;
|
||||
char *freeptr;
|
||||
char *endptr;
|
||||
} AllocBlockData;
|
||||
typedef struct AllocBlockData
|
||||
{
|
||||
struct AllocSetData *aset;
|
||||
struct AllocBlockData *next;
|
||||
char *freeptr;
|
||||
char *endptr;
|
||||
} AllocBlockData;
|
||||
|
||||
typedef AllocBlockData *AllocBlock;
|
||||
|
||||
/*
|
||||
* AllocChunk
|
||||
* AllocChunk
|
||||
* The prefix of each piece of memory in an AllocBlock
|
||||
*/
|
||||
typedef struct AllocChunkData {
|
||||
typedef struct AllocChunkData
|
||||
{
|
||||
/* aset is the owning aset if allocated, or the freelist link if free */
|
||||
void *aset;
|
||||
void *aset;
|
||||
/* size is always the chunk size */
|
||||
Size size;
|
||||
} AllocChunkData;
|
||||
Size size;
|
||||
} AllocChunkData;
|
||||
|
||||
typedef AllocChunkData *AllocChunk;
|
||||
|
||||
/*
|
||||
* AllocSet
|
||||
* AllocSet
|
||||
* Allocation set.
|
||||
*/
|
||||
typedef struct AllocSetData
|
||||
{
|
||||
struct AllocBlockData *blocks;
|
||||
struct AllocBlockData *blocks;
|
||||
#define ALLOCSET_NUM_FREELISTS 8
|
||||
struct AllocChunkData *freelist[ALLOCSET_NUM_FREELISTS];
|
||||
struct AllocChunkData *freelist[ALLOCSET_NUM_FREELISTS];
|
||||
/* Note: this will change in the future to support other modes */
|
||||
} AllocSetData;
|
||||
|
||||
typedef AllocSetData *AllocSet;
|
||||
|
||||
/*
|
||||
* AllocPointerIsValid
|
||||
* AllocPointerIsValid
|
||||
* True iff pointer is valid allocation pointer.
|
||||
*/
|
||||
#define AllocPointerIsValid(pointer) PointerIsValid(pointer)
|
||||
|
||||
/*
|
||||
* AllocSetIsValid
|
||||
* AllocSetIsValid
|
||||
* True iff set is valid allocation set.
|
||||
*/
|
||||
#define AllocSetIsValid(set) PointerIsValid(set)
|
||||
@@ -238,7 +240,7 @@ extern void AllocSetDump(AllocSet set);
|
||||
typedef int LibCCopyLength;
|
||||
|
||||
/*
|
||||
* MemoryCopy
|
||||
* MemoryCopy
|
||||
* Copies fixed length block of memory to another.
|
||||
*/
|
||||
#define MemoryCopy(toBuffer, fromBuffer, length)\
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: nabstime.h,v 1.19 1999/03/14 16:44:02 momjian Exp $
|
||||
* $Id: nabstime.h,v 1.20 1999/05/25 16:14:56 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -25,7 +25,7 @@
|
||||
*/
|
||||
/* The original typedefs are bogus - they assume that the system's 'time_t'
|
||||
* type is of size 32-bits. Under AlphaLinux, time_t is a long int, which
|
||||
* is 64-bits. Therefore, typedef these both as simply 'time_t', and let
|
||||
* is 64-bits. Therefore, typedef these both as simply 'time_t', and let
|
||||
* the OS define what the size really is. -- RME 3/5/99
|
||||
*/
|
||||
typedef time_t AbsoluteTime;
|
||||
@@ -96,7 +96,7 @@ typedef TimeIntervalData *TimeInterval;
|
||||
extern AbsoluteTime GetCurrentAbsoluteTime(void);
|
||||
|
||||
/*
|
||||
* getSystemTime
|
||||
* getSystemTime
|
||||
* Returns system time.
|
||||
*/
|
||||
#define getSystemTime() \
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*
|
||||
* 1998 Jan Wieck
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/include/utils/numeric.h,v 1.4 1999/02/13 23:22:26 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/include/utils/numeric.h,v 1.5 1999/05/25 16:14:56 momjian Exp $
|
||||
*
|
||||
* ----------
|
||||
*/
|
||||
@@ -24,10 +24,10 @@
|
||||
#define NUMERIC_DEFAULT_PRECISION 30
|
||||
#define NUMERIC_DEFAULT_SCALE 6
|
||||
|
||||
#define NUMERIC_MAX_DISPLAY_SCALE NUMERIC_MAX_PRECISION
|
||||
#define NUMERIC_MIN_DISPLAY_SCALE NUMERIC_DEFAULT_SCALE + 4
|
||||
#define NUMERIC_MAX_DISPLAY_SCALE NUMERIC_MAX_PRECISION
|
||||
#define NUMERIC_MIN_DISPLAY_SCALE NUMERIC_DEFAULT_SCALE + 4
|
||||
|
||||
#define NUMERIC_MAX_RESULT_SCALE (NUMERIC_MAX_PRECISION * 2)
|
||||
#define NUMERIC_MAX_RESULT_SCALE (NUMERIC_MAX_PRECISION * 2)
|
||||
#define NUMERIC_MIN_RESULT_SCALE (NUMERIC_DEFAULT_PRECISION + 4)
|
||||
|
||||
#define NUMERIC_UNPACKED_DATASIZE (NUMERIC_MAX_PRECISION * 2 + 4)
|
||||
@@ -38,12 +38,12 @@
|
||||
* ----------
|
||||
*/
|
||||
#define NUMERIC_SIGN_MASK 0xC000
|
||||
#define NUMERIC_POS 0x0000
|
||||
#define NUMERIC_POS 0x0000
|
||||
#define NUMERIC_NEG 0x4000
|
||||
#define NUMERIC_NAN 0xC000
|
||||
#define NUMERIC_SIGN(n) ((n)->n_sign_dscale & NUMERIC_SIGN_MASK)
|
||||
#define NUMERIC_DSCALE(n) ((n)->n_sign_dscale & ~NUMERIC_SIGN_MASK)
|
||||
#define NUMERIC_IS_NAN(n) (NUMERIC_SIGN(n) != NUMERIC_POS && \
|
||||
#define NUMERIC_IS_NAN(n) (NUMERIC_SIGN(n) != NUMERIC_POS && \
|
||||
NUMERIC_SIGN(n) != NUMERIC_NEG)
|
||||
|
||||
|
||||
@@ -51,17 +51,17 @@
|
||||
* The Numeric data type stored in the database
|
||||
* ----------
|
||||
*/
|
||||
typedef struct NumericData {
|
||||
int32 varlen; /* Variable size */
|
||||
int16 n_weight; /* Weight of 1st digit */
|
||||
uint16 n_rscale; /* Result scale */
|
||||
uint16 n_sign_dscale; /* Sign + display scale */
|
||||
unsigned char n_data[1]; /* Digit data */
|
||||
} NumericData;
|
||||
typedef struct NumericData
|
||||
{
|
||||
int32 varlen; /* Variable size */
|
||||
int16 n_weight; /* Weight of 1st digit */
|
||||
uint16 n_rscale; /* Result scale */
|
||||
uint16 n_sign_dscale; /* Sign + display scale */
|
||||
unsigned char n_data[1]; /* Digit data */
|
||||
} NumericData;
|
||||
typedef NumericData *Numeric;
|
||||
|
||||
#define NUMERIC_HDRSZ (sizeof(int32) + sizeof(uint16) * 3)
|
||||
|
||||
|
||||
#endif /* _PG_NUMERIC_H_ */
|
||||
|
||||
#endif /* _PG_NUMERIC_H_ */
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: palloc.h,v 1.8 1999/02/13 23:22:26 momjian Exp $
|
||||
* $Id: palloc.h,v 1.9 1999/05/25 16:14:56 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -17,23 +17,23 @@
|
||||
|
||||
#ifdef PALLOC_IS_MALLOC
|
||||
|
||||
# define palloc(s) malloc(s)
|
||||
# define pfree(p) free(p)
|
||||
# define repalloc(p,s) realloc((p),(s))
|
||||
#define palloc(s) malloc(s)
|
||||
#define pfree(p) free(p)
|
||||
#define repalloc(p,s) realloc((p),(s))
|
||||
|
||||
#else /* ! PALLOC_IS_MALLOC */
|
||||
#else /* ! PALLOC_IS_MALLOC */
|
||||
|
||||
/* ----------
|
||||
* In the case we use memory contexts, use macro's for palloc() etc.
|
||||
* ----------
|
||||
*/
|
||||
# include "utils/mcxt.h"
|
||||
#include "utils/mcxt.h"
|
||||
|
||||
# define palloc(s) ((void *)MemoryContextAlloc(CurrentMemoryContext,(Size)(s)))
|
||||
# define pfree(p) MemoryContextFree(CurrentMemoryContext,(Pointer)(p))
|
||||
# define repalloc(p,s) ((void *)MemoryContextRealloc(CurrentMemoryContext,(Pointer)(p),(Size)(s)))
|
||||
#define palloc(s) ((void *)MemoryContextAlloc(CurrentMemoryContext,(Size)(s)))
|
||||
#define pfree(p) MemoryContextFree(CurrentMemoryContext,(Pointer)(p))
|
||||
#define repalloc(p,s) ((void *)MemoryContextRealloc(CurrentMemoryContext,(Pointer)(p),(Size)(s)))
|
||||
|
||||
#endif /* PALLOC_IS_MALLOC */
|
||||
#endif /* PALLOC_IS_MALLOC */
|
||||
|
||||
/* like strdup except uses palloc */
|
||||
extern char *pstrdup(char *pointer);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: portal.h,v 1.12 1999/02/13 23:22:27 momjian Exp $
|
||||
* $Id: portal.h,v 1.13 1999/05/25 16:14:57 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -53,7 +53,7 @@ struct PortalD
|
||||
};
|
||||
|
||||
/*
|
||||
* PortalIsValid
|
||||
* PortalIsValid
|
||||
* True iff portal is valid.
|
||||
*/
|
||||
#define PortalIsValid(p) PointerIsValid(p)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: psort.h,v 1.18 1999/05/09 00:53:18 tgl Exp $
|
||||
* $Id: psort.h,v 1.19 1999/05/25 16:14:57 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -24,7 +24,7 @@ struct tape
|
||||
{
|
||||
int tp_dummy; /* (D) */
|
||||
int tp_fib; /* (A) */
|
||||
BufFile *tp_file; /* (TAPE) */
|
||||
BufFile *tp_file; /* (TAPE) */
|
||||
struct tape *tp_prev;
|
||||
};
|
||||
|
||||
@@ -56,7 +56,7 @@ typedef struct Psortstate
|
||||
|
||||
struct leftist *Tuples;
|
||||
|
||||
BufFile *psort_grab_file;
|
||||
BufFile *psort_grab_file;
|
||||
long psort_current; /* could be file offset, or array index */
|
||||
long psort_saved; /* could be file offset, or array index */
|
||||
bool using_tape_files;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: rel.h,v 1.22 1999/02/13 23:22:29 momjian Exp $
|
||||
* $Id: rel.h,v 1.23 1999/05/25 16:14:57 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -52,7 +52,7 @@ typedef struct RelationData
|
||||
bool rd_myxactonly; /* uses the local buffer mgr */
|
||||
bool rd_isnailed; /* rel is nailed in cache */
|
||||
bool rd_isnoname; /* rel has no name */
|
||||
bool rd_nonameunlinked; /* noname rel already unlinked */
|
||||
bool rd_nonameunlinked; /* noname rel already unlinked */
|
||||
Form_pg_am rd_am; /* AM tuple */
|
||||
Form_pg_class rd_rel; /* RELATION tuple */
|
||||
Oid rd_id; /* relations's object id */
|
||||
@@ -77,13 +77,13 @@ typedef Relation *RelationPtr;
|
||||
#define InvalidRelation ((Relation)NULL)
|
||||
|
||||
/*
|
||||
* RelationIsValid
|
||||
* RelationIsValid
|
||||
* True iff relation descriptor is valid.
|
||||
*/
|
||||
#define RelationIsValid(relation) PointerIsValid(relation)
|
||||
|
||||
/*
|
||||
* RelationGetSystemPort
|
||||
* RelationGetSystemPort
|
||||
* Returns system port of a relation.
|
||||
*
|
||||
* Note:
|
||||
@@ -92,14 +92,14 @@ typedef Relation *RelationPtr;
|
||||
#define RelationGetSystemPort(relation) ((relation)->rd_fd)
|
||||
|
||||
/*
|
||||
* RelationGetLockInfo
|
||||
* RelationGetLockInfo
|
||||
* Returns the lock information structure in the reldesc
|
||||
*
|
||||
*/
|
||||
#define RelationGetLockInfo(relation) ((relation)->lockInfo)
|
||||
|
||||
/*
|
||||
* RelationHasReferenceCountZero
|
||||
* RelationHasReferenceCountZero
|
||||
* True iff relation reference count is zero.
|
||||
*
|
||||
* Note:
|
||||
@@ -109,25 +109,25 @@ typedef Relation *RelationPtr;
|
||||
((bool)((relation)->rd_refcnt == 0))
|
||||
|
||||
/*
|
||||
* RelationSetReferenceCount
|
||||
* RelationSetReferenceCount
|
||||
* Sets relation reference count.
|
||||
*/
|
||||
#define RelationSetReferenceCount(relation,count) ((relation)->rd_refcnt = count)
|
||||
|
||||
/*
|
||||
* RelationIncrementReferenceCount
|
||||
* RelationIncrementReferenceCount
|
||||
* Increments relation reference count.
|
||||
*/
|
||||
#define RelationIncrementReferenceCount(relation) ((relation)->rd_refcnt += 1);
|
||||
|
||||
/*
|
||||
* RelationDecrementReferenceCount
|
||||
* RelationDecrementReferenceCount
|
||||
* Decrements relation reference count.
|
||||
*/
|
||||
#define RelationDecrementReferenceCount(relation) ((relation)->rd_refcnt -= 1)
|
||||
|
||||
/*
|
||||
* RelationGetForm
|
||||
* RelationGetForm
|
||||
* Returns relation attribute values for a relation.
|
||||
*
|
||||
* Note:
|
||||
@@ -137,7 +137,7 @@ typedef Relation *RelationPtr;
|
||||
|
||||
|
||||
/*
|
||||
* RelationGetRelid
|
||||
* RelationGetRelid
|
||||
*
|
||||
* returns the object id of the relation
|
||||
*
|
||||
@@ -145,7 +145,7 @@ typedef Relation *RelationPtr;
|
||||
#define RelationGetRelid(relation) ((relation)->rd_id)
|
||||
|
||||
/*
|
||||
* RelationGetFile
|
||||
* RelationGetFile
|
||||
*
|
||||
* Returns the open File decscriptor
|
||||
*/
|
||||
@@ -153,21 +153,21 @@ typedef Relation *RelationPtr;
|
||||
|
||||
|
||||
/*
|
||||
* RelationGetRelationName
|
||||
* RelationGetRelationName
|
||||
*
|
||||
* Returns a Relation Name
|
||||
*/
|
||||
#define RelationGetRelationName(relation) (&(relation)->rd_rel->relname)
|
||||
|
||||
/*
|
||||
* RelationGetRelationName
|
||||
* RelationGetRelationName
|
||||
*
|
||||
* Returns a the number of attributes.
|
||||
*/
|
||||
#define RelationGetNumberOfAttributes(relation) ((relation)->rd_rel->relnatts)
|
||||
|
||||
/*
|
||||
* RelationGetDescr
|
||||
* RelationGetDescr
|
||||
* Returns tuple descriptor for a relation.
|
||||
*
|
||||
* Note:
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: temprel.h,v 1.2 1999/02/13 23:22:32 momjian Exp $
|
||||
* $Id: temprel.h,v 1.3 1999/05/25 16:14:57 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -16,10 +16,9 @@
|
||||
#include "access/htup.h"
|
||||
#include "access/attnum.h"
|
||||
|
||||
void create_temp_relation(char *relname, HeapTuple pg_class_tuple);
|
||||
void remove_all_temp_relations(void);
|
||||
void remove_temp_relation(Oid relid);
|
||||
HeapTuple get_temp_rel_by_name(char *user_relname);
|
||||
void create_temp_relation(char *relname, HeapTuple pg_class_tuple);
|
||||
void remove_all_temp_relations(void);
|
||||
void remove_temp_relation(Oid relid);
|
||||
HeapTuple get_temp_rel_by_name(char *user_relname);
|
||||
|
||||
#endif /* TEMPREL_H */
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: tqual.h,v 1.20 1999/02/13 23:22:33 momjian Exp $
|
||||
* $Id: tqual.h,v 1.21 1999/05/25 16:14:58 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -18,11 +18,11 @@
|
||||
|
||||
typedef struct SnapshotData
|
||||
{
|
||||
TransactionId xmin; /* XID < xmin are visible to me */
|
||||
TransactionId xmax; /* XID >= xmax are invisible to me */
|
||||
uint32 xcnt; /* # of xact below */
|
||||
TransactionId *xip; /* array of xacts in progress */
|
||||
ItemPointerData tid; /* required for Dirty snapshot -:( */
|
||||
TransactionId xmin; /* XID < xmin are visible to me */
|
||||
TransactionId xmax; /* XID >= xmax are invisible to me */
|
||||
uint32 xcnt; /* # of xact below */
|
||||
TransactionId *xip; /* array of xacts in progress */
|
||||
ItemPointerData tid; /* required for Dirty snapshot -:( */
|
||||
} SnapshotData;
|
||||
|
||||
typedef SnapshotData *Snapshot;
|
||||
@@ -30,9 +30,9 @@ typedef SnapshotData *Snapshot;
|
||||
#define SnapshotNow ((Snapshot) 0x0)
|
||||
#define SnapshotSelf ((Snapshot) 0x1)
|
||||
|
||||
extern Snapshot SnapshotDirty;
|
||||
extern Snapshot QuerySnapshot;
|
||||
extern Snapshot SerializableSnapshot;
|
||||
extern Snapshot SnapshotDirty;
|
||||
extern Snapshot QuerySnapshot;
|
||||
extern Snapshot SerializableSnapshot;
|
||||
|
||||
#define IsSnapshotNow(snapshot) ((Snapshot) snapshot == SnapshotNow)
|
||||
#define IsSnapshotSelf(snapshot) ((Snapshot) snapshot == SnapshotSelf)
|
||||
@@ -42,7 +42,7 @@ extern TransactionId HeapSpecialTransactionId;
|
||||
extern CommandId HeapSpecialCommandId;
|
||||
|
||||
/*
|
||||
* HeapTupleSatisfiesVisibility
|
||||
* HeapTupleSatisfiesVisibility
|
||||
* True iff heap tuple satsifies a time qual.
|
||||
*
|
||||
* Note:
|
||||
@@ -87,22 +87,22 @@ extern CommandId HeapSpecialCommandId;
|
||||
) \
|
||||
)
|
||||
|
||||
#define HeapTupleMayBeUpdated 0
|
||||
#define HeapTupleInvisible 1
|
||||
#define HeapTupleMayBeUpdated 0
|
||||
#define HeapTupleInvisible 1
|
||||
#define HeapTupleSelfUpdated 2
|
||||
#define HeapTupleUpdated 3
|
||||
#define HeapTupleBeingUpdated 4
|
||||
|
||||
extern bool HeapTupleSatisfiesItself(HeapTupleHeader tuple);
|
||||
extern bool HeapTupleSatisfiesNow(HeapTupleHeader tuple);
|
||||
extern bool HeapTupleSatisfiesDirty(HeapTupleHeader tuple);
|
||||
extern bool HeapTupleSatisfiesSnapshot(HeapTupleHeader tuple, Snapshot snapshot);
|
||||
extern int HeapTupleSatisfiesUpdate(HeapTuple tuple);
|
||||
extern bool HeapTupleSatisfiesItself(HeapTupleHeader tuple);
|
||||
extern bool HeapTupleSatisfiesNow(HeapTupleHeader tuple);
|
||||
extern bool HeapTupleSatisfiesDirty(HeapTupleHeader tuple);
|
||||
extern bool HeapTupleSatisfiesSnapshot(HeapTupleHeader tuple, Snapshot snapshot);
|
||||
extern int HeapTupleSatisfiesUpdate(HeapTuple tuple);
|
||||
|
||||
extern void setheapoverride(bool on);
|
||||
|
||||
extern Snapshot GetSnapshotData(bool serializable);
|
||||
extern void SetQuerySnapshot(void);
|
||||
extern void FreeXactSnapshot(void);
|
||||
extern void SetQuerySnapshot(void);
|
||||
extern void FreeXactSnapshot(void);
|
||||
|
||||
#endif /* TQUAL_H */
|
||||
|
||||
@@ -27,7 +27,7 @@ char *tprintf_timestamp(void);
|
||||
#define TIMESTAMP_SIZE 0
|
||||
#endif
|
||||
|
||||
extern int tprintf1(const char *fmt, ...);
|
||||
extern int tprintf1(const char *fmt,...);
|
||||
extern int tprintf(int flag, const char *fmt,...);
|
||||
extern int eprintf(const char *fmt,...);
|
||||
extern int option_flag(int flag);
|
||||
@@ -77,12 +77,12 @@ extern int pg_options[NUM_PG_OPTIONS];
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define PRINTF(args...) tprintf1(args)
|
||||
#define EPRINTF(args...) eprintf(args)
|
||||
#define EPRINTF(args...) eprintf(args)
|
||||
#define TPRINTF(flag, args...) tprintf(flag, args)
|
||||
#else
|
||||
#define PRINTF tprintf1
|
||||
#define EPRINTF eprintf
|
||||
#define TPRINTF tprintf
|
||||
#define TPRINTF tprintf
|
||||
#endif
|
||||
|
||||
#endif /* TRACE_H */
|
||||
|
||||
Reference in New Issue
Block a user