mirror of
https://github.com/postgres/postgres.git
synced 2025-06-14 18:42:34 +03:00
Add typdefs to pgindent run.
This commit is contained in:
@ -41,7 +41,7 @@
|
|||||||
#include "utils/elog.h"
|
#include "utils/elog.h"
|
||||||
|
|
||||||
static int32
|
static int32
|
||||||
array_iterator(Oid elemtype, Oid proc, int and, ArrayType * array, Datum value)
|
array_iterator(Oid elemtype, Oid proc, int and, ArrayType *array, Datum value)
|
||||||
{
|
{
|
||||||
HeapTuple typ_tuple;
|
HeapTuple typ_tuple;
|
||||||
TypeTupleForm typ_struct;
|
TypeTupleForm typ_struct;
|
||||||
@ -157,7 +157,7 @@ array_iterator(Oid elemtype, Oid proc, int and, ArrayType * array, Datum value)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
int32
|
int32
|
||||||
array_texteq(ArrayType * array, char *value)
|
array_texteq(ArrayType *array, char *value)
|
||||||
{
|
{
|
||||||
return array_iterator((Oid) 25, /* text */
|
return array_iterator((Oid) 25, /* text */
|
||||||
(Oid) 67, /* texteq */
|
(Oid) 67, /* texteq */
|
||||||
@ -166,7 +166,7 @@ array_texteq(ArrayType * array, char *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32
|
int32
|
||||||
array_all_texteq(ArrayType * array, char *value)
|
array_all_texteq(ArrayType *array, char *value)
|
||||||
{
|
{
|
||||||
return array_iterator((Oid) 25, /* text */
|
return array_iterator((Oid) 25, /* text */
|
||||||
(Oid) 67, /* texteq */
|
(Oid) 67, /* texteq */
|
||||||
@ -175,7 +175,7 @@ array_all_texteq(ArrayType * array, char *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32
|
int32
|
||||||
array_textregexeq(ArrayType * array, char *value)
|
array_textregexeq(ArrayType *array, char *value)
|
||||||
{
|
{
|
||||||
return array_iterator((Oid) 25, /* text */
|
return array_iterator((Oid) 25, /* text */
|
||||||
(Oid) 81, /* textregexeq */
|
(Oid) 81, /* textregexeq */
|
||||||
@ -184,7 +184,7 @@ array_textregexeq(ArrayType * array, char *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32
|
int32
|
||||||
array_all_textregexeq(ArrayType * array, char *value)
|
array_all_textregexeq(ArrayType *array, char *value)
|
||||||
{
|
{
|
||||||
return array_iterator((Oid) 25, /* text */
|
return array_iterator((Oid) 25, /* text */
|
||||||
(Oid) 81, /* textregexeq */
|
(Oid) 81, /* textregexeq */
|
||||||
@ -198,7 +198,7 @@ array_all_textregexeq(ArrayType * array, char *value)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
int32
|
int32
|
||||||
array_char16eq(ArrayType * array, char *value)
|
array_char16eq(ArrayType *array, char *value)
|
||||||
{
|
{
|
||||||
return array_iterator((Oid) 20, /* char16 */
|
return array_iterator((Oid) 20, /* char16 */
|
||||||
(Oid) 490, /* char16eq */
|
(Oid) 490, /* char16eq */
|
||||||
@ -207,7 +207,7 @@ array_char16eq(ArrayType * array, char *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32
|
int32
|
||||||
array_all_char16eq(ArrayType * array, char *value)
|
array_all_char16eq(ArrayType *array, char *value)
|
||||||
{
|
{
|
||||||
return array_iterator((Oid) 20, /* char16 */
|
return array_iterator((Oid) 20, /* char16 */
|
||||||
(Oid) 490, /* char16eq */
|
(Oid) 490, /* char16eq */
|
||||||
@ -216,7 +216,7 @@ array_all_char16eq(ArrayType * array, char *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32
|
int32
|
||||||
array_char16regexeq(ArrayType * array, char *value)
|
array_char16regexeq(ArrayType *array, char *value)
|
||||||
{
|
{
|
||||||
return array_iterator((Oid) 20, /* char16 */
|
return array_iterator((Oid) 20, /* char16 */
|
||||||
(Oid) 700, /* char16regexeq */
|
(Oid) 700, /* char16regexeq */
|
||||||
@ -225,7 +225,7 @@ array_char16regexeq(ArrayType * array, char *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32
|
int32
|
||||||
array_all_char16regexeq(ArrayType * array, char *value)
|
array_all_char16regexeq(ArrayType *array, char *value)
|
||||||
{
|
{
|
||||||
return array_iterator((Oid) 20, /* char16 */
|
return array_iterator((Oid) 20, /* char16 */
|
||||||
(Oid) 700, /* char16regexeq */
|
(Oid) 700, /* char16regexeq */
|
||||||
@ -238,7 +238,7 @@ array_all_char16regexeq(ArrayType * array, char *value)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
int32
|
int32
|
||||||
array_int4eq(ArrayType * array, int4 value)
|
array_int4eq(ArrayType *array, int4 value)
|
||||||
{
|
{
|
||||||
return array_iterator((Oid) 23, /* int4 */
|
return array_iterator((Oid) 23, /* int4 */
|
||||||
(Oid) 65, /* int4eq */
|
(Oid) 65, /* int4eq */
|
||||||
@ -247,7 +247,7 @@ array_int4eq(ArrayType * array, int4 value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32
|
int32
|
||||||
array_all_int4eq(ArrayType * array, int4 value)
|
array_all_int4eq(ArrayType *array, int4 value)
|
||||||
{
|
{
|
||||||
return array_iterator((Oid) 23, /* int4 */
|
return array_iterator((Oid) 23, /* int4 */
|
||||||
(Oid) 65, /* int4eq */
|
(Oid) 65, /* int4eq */
|
||||||
@ -256,7 +256,7 @@ array_all_int4eq(ArrayType * array, int4 value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32
|
int32
|
||||||
array_int4gt(ArrayType * array, int4 value)
|
array_int4gt(ArrayType *array, int4 value)
|
||||||
{
|
{
|
||||||
return array_iterator((Oid) 23, /* int4 */
|
return array_iterator((Oid) 23, /* int4 */
|
||||||
(Oid) 147, /* int4gt */
|
(Oid) 147, /* int4gt */
|
||||||
@ -265,7 +265,7 @@ array_int4gt(ArrayType * array, int4 value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32
|
int32
|
||||||
array_all_int4gt(ArrayType * array, int4 value)
|
array_all_int4gt(ArrayType *array, int4 value)
|
||||||
{
|
{
|
||||||
return array_iterator((Oid) 23, /* int4 */
|
return array_iterator((Oid) 23, /* int4 */
|
||||||
(Oid) 147, /* int4gt */
|
(Oid) 147, /* int4gt */
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.21 1997/09/08 02:19:56 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.22 1997/09/08 20:53:40 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* some of the executor utility code such as "ExecTypeFromTL" should be
|
* some of the executor utility code such as "ExecTypeFromTL" should be
|
||||||
@ -75,7 +75,7 @@ CreateTemplateTupleDesc(int natts)
|
|||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
TupleDesc
|
TupleDesc
|
||||||
CreateTupleDesc(int natts, AttributeTupleForm * attrs)
|
CreateTupleDesc(int natts, AttributeTupleForm *attrs)
|
||||||
{
|
{
|
||||||
TupleDesc desc;
|
TupleDesc desc;
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ static void GISTInitBuffer(Buffer b, uint32 f);
|
|||||||
static BlockNumber
|
static BlockNumber
|
||||||
gistChooseSubtree(Relation r, IndexTuple itup, int level,
|
gistChooseSubtree(Relation r, IndexTuple itup, int level,
|
||||||
GISTSTATE * giststate,
|
GISTSTATE * giststate,
|
||||||
GISTSTACK ** retstack, Buffer * leafbuf);
|
GISTSTACK ** retstack, Buffer *leafbuf);
|
||||||
static OffsetNumber
|
static OffsetNumber
|
||||||
gistchoose(Relation r, Page p, IndexTuple it,
|
gistchoose(Relation r, Page p, IndexTuple it,
|
||||||
GISTSTATE * giststate);
|
GISTSTATE * giststate);
|
||||||
@ -78,7 +78,7 @@ void
|
|||||||
gistbuild(Relation heap,
|
gistbuild(Relation heap,
|
||||||
Relation index,
|
Relation index,
|
||||||
int natts,
|
int natts,
|
||||||
AttrNumber * attnum,
|
AttrNumber *attnum,
|
||||||
IndexStrategy istrat,
|
IndexStrategy istrat,
|
||||||
uint16 pint,
|
uint16 pint,
|
||||||
Datum * params,
|
Datum * params,
|
||||||
@ -470,7 +470,7 @@ gistChooseSubtree(Relation r, IndexTuple itup, /* itup has compressed
|
|||||||
int level,
|
int level,
|
||||||
GISTSTATE * giststate,
|
GISTSTATE * giststate,
|
||||||
GISTSTACK ** retstack /* out */ ,
|
GISTSTACK ** retstack /* out */ ,
|
||||||
Buffer * leafbuf /* out */ )
|
Buffer *leafbuf /* out */ )
|
||||||
{
|
{
|
||||||
Buffer buffer;
|
Buffer buffer;
|
||||||
BlockNumber blk;
|
BlockNumber blk;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.14 1997/09/08 02:20:10 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.15 1997/09/08 20:53:53 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* This file contains only the public interface routines.
|
* This file contains only the public interface routines.
|
||||||
@ -45,7 +45,7 @@ void
|
|||||||
hashbuild(Relation heap,
|
hashbuild(Relation heap,
|
||||||
Relation index,
|
Relation index,
|
||||||
int natts,
|
int natts,
|
||||||
AttrNumber * attnum,
|
AttrNumber *attnum,
|
||||||
IndexStrategy istrat,
|
IndexStrategy istrat,
|
||||||
uint16 pcount,
|
uint16 pcount,
|
||||||
Datum * params,
|
Datum * params,
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.11 1997/09/08 02:20:17 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.12 1997/09/08 20:53:59 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* Overflow pages look like ordinary relation pages.
|
* Overflow pages look like ordinary relation pages.
|
||||||
@ -26,7 +26,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static OverflowPageAddress _hash_getovfladdr(Relation rel, Buffer * metabufp);
|
static OverflowPageAddress _hash_getovfladdr(Relation rel, Buffer *metabufp);
|
||||||
static uint32 _hash_firstfreebit(uint32 map);
|
static uint32 _hash_firstfreebit(uint32 map);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -40,7 +40,7 @@ static uint32 _hash_firstfreebit(uint32 map);
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
Buffer
|
Buffer
|
||||||
_hash_addovflpage(Relation rel, Buffer * metabufp, Buffer buf)
|
_hash_addovflpage(Relation rel, Buffer *metabufp, Buffer buf)
|
||||||
{
|
{
|
||||||
|
|
||||||
OverflowPageAddress oaddr;
|
OverflowPageAddress oaddr;
|
||||||
@ -100,7 +100,7 @@ _hash_addovflpage(Relation rel, Buffer * metabufp, Buffer buf)
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static OverflowPageAddress
|
static OverflowPageAddress
|
||||||
_hash_getovfladdr(Relation rel, Buffer * metabufp)
|
_hash_getovfladdr(Relation rel, Buffer *metabufp)
|
||||||
{
|
{
|
||||||
HashMetaPage metap;
|
HashMetaPage metap;
|
||||||
Buffer mapbuf = 0;
|
Buffer mapbuf = 0;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashpage.c,v 1.11 1997/09/08 02:20:18 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashpage.c,v 1.12 1997/09/08 20:54:03 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* Postgres hash pages look like ordinary relation pages. The opaque
|
* Postgres hash pages look like ordinary relation pages. The opaque
|
||||||
@ -270,7 +270,7 @@ _hash_wrtnorelbuf(Relation rel, Buffer buf)
|
|||||||
|
|
||||||
Page
|
Page
|
||||||
_hash_chgbufaccess(Relation rel,
|
_hash_chgbufaccess(Relation rel,
|
||||||
Buffer * bufp,
|
Buffer *bufp,
|
||||||
int from_access,
|
int from_access,
|
||||||
int to_access)
|
int to_access)
|
||||||
{
|
{
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashsearch.c,v 1.12 1997/09/08 02:20:20 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashsearch.c,v 1.13 1997/09/08 20:54:05 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -31,7 +31,7 @@ void
|
|||||||
_hash_search(Relation rel,
|
_hash_search(Relation rel,
|
||||||
int keysz,
|
int keysz,
|
||||||
ScanKey scankey,
|
ScanKey scankey,
|
||||||
Buffer * bufP,
|
Buffer *bufP,
|
||||||
HashMetaPage metap)
|
HashMetaPage metap)
|
||||||
{
|
{
|
||||||
BlockNumber blkno;
|
BlockNumber blkno;
|
||||||
@ -127,7 +127,7 @@ _hash_next(IndexScanDesc scan, ScanDirection dir)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
_hash_readnext(Relation rel,
|
_hash_readnext(Relation rel,
|
||||||
Buffer * bufp, Page * pagep, HashPageOpaque * opaquep)
|
Buffer *bufp, Page * pagep, HashPageOpaque * opaquep)
|
||||||
{
|
{
|
||||||
BlockNumber blkno;
|
BlockNumber blkno;
|
||||||
|
|
||||||
@ -146,7 +146,7 @@ _hash_readnext(Relation rel,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
_hash_readprev(Relation rel,
|
_hash_readprev(Relation rel,
|
||||||
Buffer * bufp, Page * pagep, HashPageOpaque * opaquep)
|
Buffer *bufp, Page * pagep, HashPageOpaque * opaquep)
|
||||||
{
|
{
|
||||||
BlockNumber blkno;
|
BlockNumber blkno;
|
||||||
|
|
||||||
@ -284,7 +284,7 @@ _hash_first(IndexScanDesc scan, ScanDirection dir)
|
|||||||
* 'metabuf' is released when this returns.
|
* 'metabuf' is released when this returns.
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
_hash_step(IndexScanDesc scan, Buffer * bufP, ScanDirection dir, Buffer metabuf)
|
_hash_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir, Buffer metabuf)
|
||||||
{
|
{
|
||||||
Relation rel;
|
Relation rel;
|
||||||
ItemPointer current;
|
ItemPointer current;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.17 1997/09/08 02:20:28 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.18 1997/09/08 20:54:08 momjian Exp $
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* INTERFACE ROUTINES
|
* INTERFACE ROUTINES
|
||||||
@ -214,7 +214,7 @@ static HeapTuple
|
|||||||
heapgettup(Relation relation,
|
heapgettup(Relation relation,
|
||||||
ItemPointer tid,
|
ItemPointer tid,
|
||||||
int dir,
|
int dir,
|
||||||
Buffer * b,
|
Buffer *b,
|
||||||
TimeQual timeQual,
|
TimeQual timeQual,
|
||||||
int nkeys,
|
int nkeys,
|
||||||
ScanKey key)
|
ScanKey key)
|
||||||
@ -805,7 +805,7 @@ elog(DEBUG, "heap_getnext([%s,nkeys=%d],backw=%d,0x%x) called", \
|
|||||||
HeapTuple
|
HeapTuple
|
||||||
heap_getnext(HeapScanDesc scandesc,
|
heap_getnext(HeapScanDesc scandesc,
|
||||||
int backw,
|
int backw,
|
||||||
Buffer * b)
|
Buffer *b)
|
||||||
{
|
{
|
||||||
register HeapScanDesc sdesc = scandesc;
|
register HeapScanDesc sdesc = scandesc;
|
||||||
Buffer localb;
|
Buffer localb;
|
||||||
@ -1033,7 +1033,7 @@ HeapTuple
|
|||||||
heap_fetch(Relation relation,
|
heap_fetch(Relation relation,
|
||||||
TimeQual timeQual,
|
TimeQual timeQual,
|
||||||
ItemPointer tid,
|
ItemPointer tid,
|
||||||
Buffer * b)
|
Buffer *b)
|
||||||
{
|
{
|
||||||
ItemId lp;
|
ItemId lp;
|
||||||
Buffer buffer;
|
Buffer buffer;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.11 1997/09/08 02:20:49 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.12 1997/09/08 20:54:15 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* Postgres btree pages look like ordinary relation pages. The opaque
|
* Postgres btree pages look like ordinary relation pages. The opaque
|
||||||
@ -56,7 +56,7 @@ typedef struct BTMetaPageData
|
|||||||
#ifdef BTREE_VERSION_1
|
#ifdef BTREE_VERSION_1
|
||||||
int32 btm_level;
|
int32 btm_level;
|
||||||
#endif
|
#endif
|
||||||
} BTMetaPageData;
|
} BTMetaPageData;
|
||||||
|
|
||||||
#define BTPageGetMeta(p) \
|
#define BTPageGetMeta(p) \
|
||||||
((BTMetaPageData *) &((PageHeader) p)->pd_linp[0])
|
((BTMetaPageData *) &((PageHeader) p)->pd_linp[0])
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.21 1997/09/08 02:20:50 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.22 1997/09/08 20:54:21 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* This file contains only the public interface routines.
|
* This file contains only the public interface routines.
|
||||||
@ -56,7 +56,7 @@ void
|
|||||||
btbuild(Relation heap,
|
btbuild(Relation heap,
|
||||||
Relation index,
|
Relation index,
|
||||||
int natts,
|
int natts,
|
||||||
AttrNumber * attnum,
|
AttrNumber *attnum,
|
||||||
IndexStrategy istrat,
|
IndexStrategy istrat,
|
||||||
uint16 pcount,
|
uint16 pcount,
|
||||||
Datum * params,
|
Datum * params,
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.9 1997/09/08 02:20:52 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.10 1997/09/08 20:54:24 momjian Exp $
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
@ -36,7 +36,7 @@ typedef struct BTScanListData
|
|||||||
{
|
{
|
||||||
IndexScanDesc btsl_scan;
|
IndexScanDesc btsl_scan;
|
||||||
struct BTScanListData *btsl_next;
|
struct BTScanListData *btsl_next;
|
||||||
} BTScanListData;
|
} BTScanListData;
|
||||||
|
|
||||||
typedef BTScanListData *BTScanList;
|
typedef BTScanListData *BTScanList;
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.25 1997/09/08 02:20:57 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.26 1997/09/08 20:54:27 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
static BTStack
|
static BTStack
|
||||||
_bt_searchr(Relation rel, int keysz, ScanKey scankey,
|
_bt_searchr(Relation rel, int keysz, ScanKey scankey,
|
||||||
Buffer * bufP, BTStack stack_in);
|
Buffer *bufP, BTStack stack_in);
|
||||||
static OffsetNumber
|
static OffsetNumber
|
||||||
_bt_firsteq(Relation rel, TupleDesc itupdesc, Page page,
|
_bt_firsteq(Relation rel, TupleDesc itupdesc, Page page,
|
||||||
Size keysz, ScanKey scankey, OffsetNumber offnum);
|
Size keysz, ScanKey scankey, OffsetNumber offnum);
|
||||||
@ -38,7 +38,7 @@ static int
|
|||||||
_bt_compare(Relation rel, TupleDesc itupdesc, Page page,
|
_bt_compare(Relation rel, TupleDesc itupdesc, Page page,
|
||||||
int keysz, ScanKey scankey, OffsetNumber offnum);
|
int keysz, ScanKey scankey, OffsetNumber offnum);
|
||||||
static bool
|
static bool
|
||||||
_bt_twostep(IndexScanDesc scan, Buffer * bufP, ScanDirection dir);
|
_bt_twostep(IndexScanDesc scan, Buffer *bufP, ScanDirection dir);
|
||||||
static RetrieveIndexResult
|
static RetrieveIndexResult
|
||||||
_bt_endpoint(IndexScanDesc scan, ScanDirection dir);
|
_bt_endpoint(IndexScanDesc scan, ScanDirection dir);
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ static RetrieveIndexResult
|
|||||||
* calls a recursive-descent search routine on the tree.
|
* calls a recursive-descent search routine on the tree.
|
||||||
*/
|
*/
|
||||||
BTStack
|
BTStack
|
||||||
_bt_search(Relation rel, int keysz, ScanKey scankey, Buffer * bufP)
|
_bt_search(Relation rel, int keysz, ScanKey scankey, Buffer *bufP)
|
||||||
{
|
{
|
||||||
*bufP = _bt_getroot(rel, BT_READ);
|
*bufP = _bt_getroot(rel, BT_READ);
|
||||||
return (_bt_searchr(rel, keysz, scankey, bufP, (BTStack) NULL));
|
return (_bt_searchr(rel, keysz, scankey, bufP, (BTStack) NULL));
|
||||||
@ -62,7 +62,7 @@ static BTStack
|
|||||||
_bt_searchr(Relation rel,
|
_bt_searchr(Relation rel,
|
||||||
int keysz,
|
int keysz,
|
||||||
ScanKey scankey,
|
ScanKey scankey,
|
||||||
Buffer * bufP,
|
Buffer *bufP,
|
||||||
BTStack stack_in)
|
BTStack stack_in)
|
||||||
{
|
{
|
||||||
BTStack stack;
|
BTStack stack;
|
||||||
@ -1060,7 +1060,7 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
|
|||||||
* scan to the right thing.
|
* scan to the right thing.
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
_bt_step(IndexScanDesc scan, Buffer * bufP, ScanDirection dir)
|
_bt_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir)
|
||||||
{
|
{
|
||||||
Page page;
|
Page page;
|
||||||
BTPageOpaque opaque;
|
BTPageOpaque opaque;
|
||||||
@ -1236,7 +1236,7 @@ _bt_step(IndexScanDesc scan, Buffer * bufP, ScanDirection dir)
|
|||||||
* succeeded, we return true; otherwise, we return false.
|
* succeeded, we return true; otherwise, we return false.
|
||||||
*/
|
*/
|
||||||
static bool
|
static bool
|
||||||
_bt_twostep(IndexScanDesc scan, Buffer * bufP, ScanDirection dir)
|
_bt_twostep(IndexScanDesc scan, Buffer *bufP, ScanDirection dir)
|
||||||
{
|
{
|
||||||
Page page;
|
Page page;
|
||||||
BTPageOpaque opaque;
|
BTPageOpaque opaque;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Id: nbtsort.c,v 1.21 1997/09/08 02:20:58 momjian Exp $
|
* $Id: nbtsort.c,v 1.22 1997/09/08 20:54:28 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
*
|
*
|
||||||
@ -72,7 +72,7 @@ extern int ShowExecutorStats;
|
|||||||
static BTItem _bt_buildadd(Relation index, void *pstate, BTItem bti, int flags);
|
static BTItem _bt_buildadd(Relation index, void *pstate, BTItem bti, int flags);
|
||||||
static BTItem _bt_minitem(Page opage, BlockNumber oblkno, int atend);
|
static BTItem _bt_minitem(Page opage, BlockNumber oblkno, int atend);
|
||||||
static void *_bt_pagestate(Relation index, int flags, int level, bool doupper);
|
static void *_bt_pagestate(Relation index, int flags, int level, bool doupper);
|
||||||
static void _bt_uppershutdown(Relation index, BTPageState * state);
|
static void _bt_uppershutdown(Relation index, BTPageState *state);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* turn on debugging output.
|
* turn on debugging output.
|
||||||
@ -113,7 +113,7 @@ typedef struct
|
|||||||
short bttb_ntup; /* number of tuples in this block */
|
short bttb_ntup; /* number of tuples in this block */
|
||||||
short bttb_eor; /* End-Of-Run marker */
|
short bttb_eor; /* End-Of-Run marker */
|
||||||
char bttb_data[TAPEBLCKSZ - 2 * sizeof(double)];
|
char bttb_data[TAPEBLCKSZ - 2 * sizeof(double)];
|
||||||
} BTTapeBlock;
|
} BTTapeBlock;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* this structure holds the bookkeeping for a simple balanced multiway
|
* this structure holds the bookkeeping for a simple balanced multiway
|
||||||
@ -129,7 +129,7 @@ typedef struct
|
|||||||
BTTapeBlock **bts_itape; /* input tape blocks */
|
BTTapeBlock **bts_itape; /* input tape blocks */
|
||||||
BTTapeBlock **bts_otape; /* output tape blocks */
|
BTTapeBlock **bts_otape; /* output tape blocks */
|
||||||
bool isunique;
|
bool isunique;
|
||||||
} BTSpool;
|
} BTSpool;
|
||||||
|
|
||||||
/*-------------------------------------------------------------------------
|
/*-------------------------------------------------------------------------
|
||||||
* sorting comparison routine - returns {-1,0,1} depending on whether
|
* sorting comparison routine - returns {-1,0,1} depending on whether
|
||||||
@ -154,14 +154,14 @@ typedef struct
|
|||||||
Datum *btsk_datum;
|
Datum *btsk_datum;
|
||||||
char *btsk_nulls;
|
char *btsk_nulls;
|
||||||
BTItem btsk_item;
|
BTItem btsk_item;
|
||||||
} BTSortKey;
|
} BTSortKey;
|
||||||
|
|
||||||
static Relation _bt_sortrel;
|
static Relation _bt_sortrel;
|
||||||
static int _bt_nattr;
|
static int _bt_nattr;
|
||||||
static BTSpool *_bt_inspool;
|
static BTSpool *_bt_inspool;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_bt_isortcmpinit(Relation index, BTSpool * spool)
|
_bt_isortcmpinit(Relation index, BTSpool *spool)
|
||||||
{
|
{
|
||||||
_bt_sortrel = index;
|
_bt_sortrel = index;
|
||||||
_bt_inspool = spool;
|
_bt_inspool = spool;
|
||||||
@ -169,7 +169,7 @@ _bt_isortcmpinit(Relation index, BTSpool * spool)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_bt_isortcmp(BTSortKey * k1, BTSortKey * k2)
|
_bt_isortcmp(BTSortKey *k1, BTSortKey *k2)
|
||||||
{
|
{
|
||||||
Datum *k1_datum = k1->btsk_datum;
|
Datum *k1_datum = k1->btsk_datum;
|
||||||
Datum *k2_datum = k2->btsk_datum;
|
Datum *k2_datum = k2->btsk_datum;
|
||||||
@ -218,7 +218,7 @@ _bt_isortcmp(BTSortKey * k1, BTSortKey * k2)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_bt_setsortkey(Relation index, BTItem bti, BTSortKey * sk)
|
_bt_setsortkey(Relation index, BTItem bti, BTSortKey *sk)
|
||||||
{
|
{
|
||||||
sk->btsk_item = (BTItem) NULL;
|
sk->btsk_item = (BTItem) NULL;
|
||||||
sk->btsk_datum = (Datum *) NULL;
|
sk->btsk_datum = (Datum *) NULL;
|
||||||
@ -262,7 +262,7 @@ typedef struct
|
|||||||
{
|
{
|
||||||
int btpqe_tape; /* tape identifier */
|
int btpqe_tape; /* tape identifier */
|
||||||
BTSortKey btpqe_item; /* pointer to BTItem in tape buffer */
|
BTSortKey btpqe_item; /* pointer to BTItem in tape buffer */
|
||||||
} BTPriQueueElem;
|
} BTPriQueueElem;
|
||||||
|
|
||||||
#define MAXELEM MAXTAPES
|
#define MAXELEM MAXTAPES
|
||||||
typedef struct
|
typedef struct
|
||||||
@ -270,14 +270,14 @@ typedef struct
|
|||||||
int btpq_nelem;
|
int btpq_nelem;
|
||||||
BTPriQueueElem btpq_queue[MAXELEM];
|
BTPriQueueElem btpq_queue[MAXELEM];
|
||||||
Relation btpq_rel;
|
Relation btpq_rel;
|
||||||
} BTPriQueue;
|
} BTPriQueue;
|
||||||
|
|
||||||
/* be sure to call _bt_isortcmpinit first */
|
/* be sure to call _bt_isortcmpinit first */
|
||||||
#define GREATER(a, b) \
|
#define GREATER(a, b) \
|
||||||
(_bt_isortcmp(&((a)->btpqe_item), &((b)->btpqe_item)) > 0)
|
(_bt_isortcmp(&((a)->btpqe_item), &((b)->btpqe_item)) > 0)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_bt_pqsift(BTPriQueue * q, int parent)
|
_bt_pqsift(BTPriQueue *q, int parent)
|
||||||
{
|
{
|
||||||
int child;
|
int child;
|
||||||
BTPriQueueElem e;
|
BTPriQueueElem e;
|
||||||
@ -308,7 +308,7 @@ _bt_pqsift(BTPriQueue * q, int parent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_bt_pqnext(BTPriQueue * q, BTPriQueueElem * e)
|
_bt_pqnext(BTPriQueue *q, BTPriQueueElem *e)
|
||||||
{
|
{
|
||||||
if (q->btpq_nelem < 1)
|
if (q->btpq_nelem < 1)
|
||||||
{ /* already empty */
|
{ /* already empty */
|
||||||
@ -326,7 +326,7 @@ _bt_pqnext(BTPriQueue * q, BTPriQueueElem * e)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_bt_pqadd(BTPriQueue * q, BTPriQueueElem * e)
|
_bt_pqadd(BTPriQueue *q, BTPriQueueElem *e)
|
||||||
{
|
{
|
||||||
int child,
|
int child,
|
||||||
parent;
|
parent;
|
||||||
@ -376,7 +376,7 @@ _bt_pqadd(BTPriQueue * q, BTPriQueueElem * e)
|
|||||||
* empty.)
|
* empty.)
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
_bt_tapereset(BTTapeBlock * tape)
|
_bt_tapereset(BTTapeBlock *tape)
|
||||||
{
|
{
|
||||||
tape->bttb_eor = 0;
|
tape->bttb_eor = 0;
|
||||||
tape->bttb_top = 0;
|
tape->bttb_top = 0;
|
||||||
@ -387,7 +387,7 @@ _bt_tapereset(BTTapeBlock * tape)
|
|||||||
* rewind the physical tape file.
|
* rewind the physical tape file.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
_bt_taperewind(BTTapeBlock * tape)
|
_bt_taperewind(BTTapeBlock *tape)
|
||||||
{
|
{
|
||||||
FileSeek(tape->bttb_fd, 0, SEEK_SET);
|
FileSeek(tape->bttb_fd, 0, SEEK_SET);
|
||||||
}
|
}
|
||||||
@ -402,7 +402,7 @@ _bt_taperewind(BTTapeBlock * tape)
|
|||||||
* least you don't have to delete and reinsert the directory entries.
|
* least you don't have to delete and reinsert the directory entries.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
_bt_tapeclear(BTTapeBlock * tape)
|
_bt_tapeclear(BTTapeBlock *tape)
|
||||||
{
|
{
|
||||||
/* blow away the contents of the old file */
|
/* blow away the contents of the old file */
|
||||||
_bt_taperewind(tape);
|
_bt_taperewind(tape);
|
||||||
@ -444,7 +444,7 @@ _bt_tapecreate(char *fname)
|
|||||||
* destroy the BTTapeBlock structure and its physical tape file.
|
* destroy the BTTapeBlock structure and its physical tape file.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
_bt_tapedestroy(BTTapeBlock * tape)
|
_bt_tapedestroy(BTTapeBlock *tape)
|
||||||
{
|
{
|
||||||
FileUnlink(tape->bttb_fd);
|
FileUnlink(tape->bttb_fd);
|
||||||
pfree((void *) tape);
|
pfree((void *) tape);
|
||||||
@ -454,7 +454,7 @@ _bt_tapedestroy(BTTapeBlock * tape)
|
|||||||
* flush the tape block to the file, marking End-Of-Run if requested.
|
* flush the tape block to the file, marking End-Of-Run if requested.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
_bt_tapewrite(BTTapeBlock * tape, int eor)
|
_bt_tapewrite(BTTapeBlock *tape, int eor)
|
||||||
{
|
{
|
||||||
tape->bttb_eor = eor;
|
tape->bttb_eor = eor;
|
||||||
FileWrite(tape->bttb_fd, (char *) tape, TAPEBLCKSZ);
|
FileWrite(tape->bttb_fd, (char *) tape, TAPEBLCKSZ);
|
||||||
@ -472,7 +472,7 @@ _bt_tapewrite(BTTapeBlock * tape, int eor)
|
|||||||
* - 1 if a valid block was read
|
* - 1 if a valid block was read
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
_bt_taperead(BTTapeBlock * tape)
|
_bt_taperead(BTTapeBlock *tape)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
int nread;
|
int nread;
|
||||||
@ -511,7 +511,7 @@ _bt_taperead(BTTapeBlock * tape)
|
|||||||
* - sets 'pos' to the current position within the block.
|
* - sets 'pos' to the current position within the block.
|
||||||
*/
|
*/
|
||||||
static BTItem
|
static BTItem
|
||||||
_bt_tapenext(BTTapeBlock * tape, char **pos)
|
_bt_tapenext(BTTapeBlock *tape, char **pos)
|
||||||
{
|
{
|
||||||
Size itemsz;
|
Size itemsz;
|
||||||
BTItem bti;
|
BTItem bti;
|
||||||
@ -520,7 +520,7 @@ _bt_tapenext(BTTapeBlock * tape, char **pos)
|
|||||||
{
|
{
|
||||||
return ((BTItem) NULL);
|
return ((BTItem) NULL);
|
||||||
}
|
}
|
||||||
bti = (BTItem) * pos;
|
bti = (BTItem) *pos;
|
||||||
itemsz = BTITEMSZ(bti);
|
itemsz = BTITEMSZ(bti);
|
||||||
*pos += DOUBLEALIGN(itemsz);
|
*pos += DOUBLEALIGN(itemsz);
|
||||||
return (bti);
|
return (bti);
|
||||||
@ -538,7 +538,7 @@ _bt_tapenext(BTTapeBlock * tape, char **pos)
|
|||||||
* the beginning of free space.
|
* the beginning of free space.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
_bt_tapeadd(BTTapeBlock * tape, BTItem item, int itemsz)
|
_bt_tapeadd(BTTapeBlock *tape, BTItem item, int itemsz)
|
||||||
{
|
{
|
||||||
memcpy(tape->bttb_data + tape->bttb_top, item, itemsz);
|
memcpy(tape->bttb_data + tape->bttb_top, item, itemsz);
|
||||||
++tape->bttb_ntup;
|
++tape->bttb_ntup;
|
||||||
@ -615,7 +615,7 @@ _bt_spooldestroy(void *spool)
|
|||||||
* flush out any dirty output tape blocks
|
* flush out any dirty output tape blocks
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
_bt_spoolflush(BTSpool * btspool)
|
_bt_spoolflush(BTSpool *btspool)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -635,7 +635,7 @@ _bt_spoolflush(BTSpool * btspool)
|
|||||||
* output tapes.
|
* output tapes.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
_bt_spoolswap(BTSpool * btspool)
|
_bt_spoolswap(BTSpool *btspool)
|
||||||
{
|
{
|
||||||
File tmpfd;
|
File tmpfd;
|
||||||
BTTapeBlock *itape;
|
BTTapeBlock *itape;
|
||||||
@ -800,7 +800,7 @@ _bt_spool(Relation index, BTItem btitem, void *spool)
|
|||||||
* allocate a new, clean btree page, not linked to any siblings.
|
* allocate a new, clean btree page, not linked to any siblings.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
_bt_blnewpage(Relation index, Buffer * buf, Page * page, int flags)
|
_bt_blnewpage(Relation index, Buffer *buf, Page * page, int flags)
|
||||||
{
|
{
|
||||||
BTPageOpaque opaque;
|
BTPageOpaque opaque;
|
||||||
|
|
||||||
@ -1107,7 +1107,7 @@ _bt_buildadd(Relation index, void *pstate, BTItem bti, int flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_bt_uppershutdown(Relation index, BTPageState * state)
|
_bt_uppershutdown(Relation index, BTPageState *state)
|
||||||
{
|
{
|
||||||
BTPageState *s;
|
BTPageState *s;
|
||||||
BlockNumber blkno;
|
BlockNumber blkno;
|
||||||
@ -1158,7 +1158,7 @@ _bt_uppershutdown(Relation index, BTPageState * state)
|
|||||||
* XXX three nested loops? gross. cut me up into smaller routines.
|
* XXX three nested loops? gross. cut me up into smaller routines.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
_bt_merge(Relation index, BTSpool * btspool)
|
_bt_merge(Relation index, BTSpool *btspool)
|
||||||
{
|
{
|
||||||
BTPageState *state;
|
BTPageState *state;
|
||||||
BTPriQueue q;
|
BTPriQueue q;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtproc.c,v 1.9 1997/09/08 02:21:05 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtproc.c,v 1.10 1997/09/08 20:54:32 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -23,7 +23,8 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
BOX
|
BOX
|
||||||
* rt_box_union(BOX * a, BOX * b)
|
*
|
||||||
|
rt_box_union(BOX *a, BOX *b)
|
||||||
{
|
{
|
||||||
BOX *n;
|
BOX *n;
|
||||||
|
|
||||||
@ -39,7 +40,7 @@ BOX
|
|||||||
}
|
}
|
||||||
|
|
||||||
BOX *
|
BOX *
|
||||||
rt_box_inter(BOX * a, BOX * b)
|
rt_box_inter(BOX *a, BOX *b)
|
||||||
{
|
{
|
||||||
BOX *n;
|
BOX *n;
|
||||||
|
|
||||||
@ -61,7 +62,7 @@ rt_box_inter(BOX * a, BOX * b)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
rt_box_size(BOX * a, float *size)
|
rt_box_size(BOX *a, float *size)
|
||||||
{
|
{
|
||||||
if (a == (BOX *) NULL || a->high.x <= a->low.x || a->high.y <= a->low.y)
|
if (a == (BOX *) NULL || a->high.x <= a->low.x || a->high.y <= a->low.y)
|
||||||
*size = 0.0;
|
*size = 0.0;
|
||||||
@ -80,7 +81,7 @@ rt_box_size(BOX * a, float *size)
|
|||||||
* have a special return type for big boxes.
|
* have a special return type for big boxes.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
rt_bigbox_size(BOX * a, float *size)
|
rt_bigbox_size(BOX *a, float *size)
|
||||||
{
|
{
|
||||||
rt_box_size(a, size);
|
rt_box_size(a, size);
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.15 1997/09/08 02:21:06 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.16 1997/09/08 20:54:33 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -78,7 +78,7 @@ void
|
|||||||
rtbuild(Relation heap,
|
rtbuild(Relation heap,
|
||||||
Relation index,
|
Relation index,
|
||||||
int natts,
|
int natts,
|
||||||
AttrNumber * attnum,
|
AttrNumber *attnum,
|
||||||
IndexStrategy istrat,
|
IndexStrategy istrat,
|
||||||
uint16 pcount,
|
uint16 pcount,
|
||||||
Datum * params,
|
Datum * params,
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.11 1997/09/08 02:21:14 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.12 1997/09/08 20:54:36 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* This file contains the high level access-method interface to the
|
* This file contains the high level access-method interface to the
|
||||||
@ -273,8 +273,8 @@ TransactionLogUpdate(TransactionId transactionId, /* trans id to update */
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
AbsoluteTime /* commit time of transaction id */
|
AbsoluteTime /* commit time of transaction id */
|
||||||
TransactionIdGetCommitTime(TransactionId transactionId) /* transaction id to
|
TransactionIdGetCommitTime(TransactionId transactionId) /* transaction id to
|
||||||
* test */
|
* test */
|
||||||
{
|
{
|
||||||
BlockNumber blockNumber;
|
BlockNumber blockNumber;
|
||||||
AbsoluteTime commitTime; /* commit time */
|
AbsoluteTime commitTime; /* commit time */
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.11 1997/09/08 02:21:18 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.12 1997/09/08 20:54:37 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* This file contains support functions for the high
|
* This file contains support functions for the high
|
||||||
@ -61,7 +61,7 @@ void
|
|||||||
TransComputeBlockNumber(Relation relation, /* relation to test */
|
TransComputeBlockNumber(Relation relation, /* relation to test */
|
||||||
TransactionId transactionId, /* transaction id to
|
TransactionId transactionId, /* transaction id to
|
||||||
* test */
|
* test */
|
||||||
BlockNumber * blockNumberOutP)
|
BlockNumber *blockNumberOutP)
|
||||||
{
|
{
|
||||||
long itemsPerBlock = 0;
|
long itemsPerBlock = 0;
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.23 1997/09/08 02:21:29 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.24 1997/09/08 20:54:40 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -1111,7 +1111,7 @@ void
|
|||||||
index_register(char *heap,
|
index_register(char *heap,
|
||||||
char *ind,
|
char *ind,
|
||||||
int natts,
|
int natts,
|
||||||
AttrNumber * attnos,
|
AttrNumber *attnos,
|
||||||
uint16 nparams,
|
uint16 nparams,
|
||||||
Datum * params,
|
Datum * params,
|
||||||
FuncIndexInfo * finfo,
|
FuncIndexInfo * finfo,
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.26 1997/09/08 02:21:37 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.27 1997/09/08 20:54:54 momjian Exp $
|
||||||
*
|
*
|
||||||
* INTERFACE ROUTINES
|
* INTERFACE ROUTINES
|
||||||
* heap_creatr() - Create an uncataloged heap relation
|
* heap_creatr() - Create an uncataloged heap relation
|
||||||
@ -1524,7 +1524,7 @@ pg_plan(char *query_string, Oid * typev, int nargs,
|
|||||||
QueryTreeList ** queryListP, CommandDest dest);
|
QueryTreeList ** queryListP, CommandDest dest);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
StoreAttrDefault(Relation rel, AttrDefault * attrdef)
|
StoreAttrDefault(Relation rel, AttrDefault *attrdef)
|
||||||
{
|
{
|
||||||
char str[MAX_PARSE_BUFFER];
|
char str[MAX_PARSE_BUFFER];
|
||||||
char cast[2 * NAMEDATALEN] = {0};
|
char cast[2 * NAMEDATALEN] = {0};
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.13 1997/09/08 02:21:44 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.14 1997/09/08 20:55:07 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -154,7 +154,7 @@ CatalogIndexInsert(Relation * idescs,
|
|||||||
finfoP = (FuncIndexInfo *) NULL;
|
finfoP = (FuncIndexInfo *) NULL;
|
||||||
|
|
||||||
FormIndexDatum(natts,
|
FormIndexDatum(natts,
|
||||||
(AttrNumber *) & pgIndexP->indkey[0],
|
(AttrNumber *) &pgIndexP->indkey[0],
|
||||||
heapTuple,
|
heapTuple,
|
||||||
heapDescriptor,
|
heapDescriptor,
|
||||||
InvalidBuffer,
|
InvalidBuffer,
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.31 1997/09/08 02:22:03 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.32 1997/09/08 20:55:19 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -775,7 +775,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE * fp, char *delim)
|
|||||||
#endif /* OMIT_PARTIAL_INDEX */
|
#endif /* OMIT_PARTIAL_INDEX */
|
||||||
}
|
}
|
||||||
FormIndexDatum(indexNatts[i],
|
FormIndexDatum(indexNatts[i],
|
||||||
(AttrNumber *) & (pgIndexP[i]->indkey[0]),
|
(AttrNumber *) &(pgIndexP[i]->indkey[0]),
|
||||||
tuple,
|
tuple,
|
||||||
tupDesc,
|
tupDesc,
|
||||||
InvalidBuffer,
|
InvalidBuffer,
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/defind.c,v 1.14 1997/09/08 02:22:08 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/defind.c,v 1.15 1997/09/08 20:55:25 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -46,10 +46,10 @@ CheckPredExpr(Node * predicate, List * rangeTable,
|
|||||||
static void
|
static void
|
||||||
CheckPredClause(Expr * predicate, List * rangeTable, Oid baseRelOid);
|
CheckPredClause(Expr * predicate, List * rangeTable, Oid baseRelOid);
|
||||||
static void
|
static void
|
||||||
FuncIndexArgs(IndexElem * funcIndex, AttrNumber * attNumP,
|
FuncIndexArgs(IndexElem * funcIndex, AttrNumber *attNumP,
|
||||||
Oid * argTypes, Oid * opOidP, Oid relId);
|
Oid * argTypes, Oid * opOidP, Oid relId);
|
||||||
static void
|
static void
|
||||||
NormIndexAttrs(List * attList, AttrNumber * attNumP,
|
NormIndexAttrs(List * attList, AttrNumber *attNumP,
|
||||||
Oid * opOidP, Oid relId);
|
Oid * opOidP, Oid relId);
|
||||||
static char *GetDefaultOpClass(Oid atttypid);
|
static char *GetDefaultOpClass(Oid atttypid);
|
||||||
|
|
||||||
@ -422,7 +422,7 @@ CheckPredClause(Expr * predicate, List * rangeTable, Oid baseRelOid)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
FuncIndexArgs(IndexElem * funcIndex,
|
FuncIndexArgs(IndexElem * funcIndex,
|
||||||
AttrNumber * attNumP,
|
AttrNumber *attNumP,
|
||||||
Oid * argTypes,
|
Oid * argTypes,
|
||||||
Oid * opOidP,
|
Oid * opOidP,
|
||||||
Oid relId)
|
Oid relId)
|
||||||
@ -471,7 +471,7 @@ FuncIndexArgs(IndexElem * funcIndex,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
NormIndexAttrs(List * attList, /* list of IndexElem's */
|
NormIndexAttrs(List * attList, /* list of IndexElem's */
|
||||||
AttrNumber * attNumP,
|
AttrNumber *attNumP,
|
||||||
Oid * opOidP,
|
Oid * opOidP,
|
||||||
Oid relId)
|
Oid relId)
|
||||||
{
|
{
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.12 1997/09/08 02:22:13 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.13 1997/09/08 20:55:27 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -398,7 +398,7 @@ RemoveFunction(char *functionName, /* function name to be removed */
|
|||||||
ReleaseBuffer(buffer);
|
ReleaseBuffer(buffer);
|
||||||
bufferUsed = FALSE;
|
bufferUsed = FALSE;
|
||||||
}
|
}
|
||||||
tup = heap_getnext(scan, 0, (Buffer *) & buffer);
|
tup = heap_getnext(scan, 0, (Buffer *) &buffer);
|
||||||
if (!HeapTupleIsValid(tup))
|
if (!HeapTupleIsValid(tup))
|
||||||
break;
|
break;
|
||||||
bufferUsed = TRUE;
|
bufferUsed = TRUE;
|
||||||
|
@ -61,7 +61,7 @@ typedef SeqTableData *SeqTable;
|
|||||||
static SeqTable seqtab = NULL;
|
static SeqTable seqtab = NULL;
|
||||||
|
|
||||||
static SeqTable init_sequence(char *caller, char *name);
|
static SeqTable init_sequence(char *caller, char *name);
|
||||||
static SequenceTupleForm read_info(char *caller, SeqTable elm, Buffer * buf);
|
static SequenceTupleForm read_info(char *caller, SeqTable elm, Buffer *buf);
|
||||||
static void init_params(CreateSeqStmt * seq, SequenceTupleForm new);
|
static void init_params(CreateSeqStmt * seq, SequenceTupleForm new);
|
||||||
static int get_param(DefElem * def);
|
static int get_param(DefElem * def);
|
||||||
|
|
||||||
@ -323,7 +323,7 @@ currval(struct varlena * seqin)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static SequenceTupleForm
|
static SequenceTupleForm
|
||||||
read_info(char *caller, SeqTable elm, Buffer * buf)
|
read_info(char *caller, SeqTable elm, Buffer *buf)
|
||||||
{
|
{
|
||||||
ItemPointerData iptr;
|
ItemPointerData iptr;
|
||||||
PageHeader page;
|
PageHeader page;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.44 1997/09/08 02:22:17 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.45 1997/09/08 20:55:34 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -1224,7 +1224,7 @@ failed to add item with len = %u to page %u (free space %u, nusd %u, noff %u)",
|
|||||||
{
|
{
|
||||||
FormIndexDatum(
|
FormIndexDatum(
|
||||||
idcur->natts,
|
idcur->natts,
|
||||||
(AttrNumber *) & (idcur->tform->indkey[0]),
|
(AttrNumber *) &(idcur->tform->indkey[0]),
|
||||||
newtup,
|
newtup,
|
||||||
tupdesc,
|
tupdesc,
|
||||||
InvalidBuffer,
|
InvalidBuffer,
|
||||||
@ -1949,7 +1949,7 @@ vc_updstats(Oid relid, int npages, int ntups, bool hasindex, VRelStats * vacrels
|
|||||||
if (VacAttrStatsLtGtValid(stats) && stats->initialized /* &&
|
if (VacAttrStatsLtGtValid(stats) && stats->initialized /* &&
|
||||||
* !IsSystemRelationName(
|
* !IsSystemRelationName(
|
||||||
*
|
*
|
||||||
pgcform->relname.data) */ )
|
pgcform->relname.data) */ )
|
||||||
{
|
{
|
||||||
func_ptr out_function;
|
func_ptr out_function;
|
||||||
char *out_string;
|
char *out_string;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.14 1997/09/08 02:22:33 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.15 1997/09/08 20:55:37 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -69,9 +69,9 @@ bool execConstByVal;
|
|||||||
int execConstLen;
|
int execConstLen;
|
||||||
|
|
||||||
/* static functions decls */
|
/* static functions decls */
|
||||||
static Datum ExecEvalAggreg(Aggreg * agg, ExprContext * econtext, bool * isNull);
|
static Datum ExecEvalAggreg(Aggreg *agg, ExprContext * econtext, bool * isNull);
|
||||||
static Datum
|
static Datum
|
||||||
ExecEvalArrayRef(ArrayRef * arrayRef, ExprContext * econtext,
|
ExecEvalArrayRef(ArrayRef *arrayRef, ExprContext * econtext,
|
||||||
bool * isNull, bool * isDone);
|
bool * isNull, bool * isDone);
|
||||||
static Datum ExecEvalAnd(Expr * andExpr, ExprContext * econtext, bool * isNull);
|
static Datum ExecEvalAnd(Expr * andExpr, ExprContext * econtext, bool * isNull);
|
||||||
static Datum
|
static Datum
|
||||||
@ -101,7 +101,7 @@ static bool ExecQualClause(Node * clause, ExprContext * econtext);
|
|||||||
* --------------------------------
|
* --------------------------------
|
||||||
*/
|
*/
|
||||||
static Datum
|
static Datum
|
||||||
ExecEvalArrayRef(ArrayRef * arrayRef,
|
ExecEvalArrayRef(ArrayRef *arrayRef,
|
||||||
ExprContext * econtext,
|
ExprContext * econtext,
|
||||||
bool * isNull,
|
bool * isNull,
|
||||||
bool * isDone)
|
bool * isDone)
|
||||||
@ -200,7 +200,7 @@ ExecEvalArrayRef(ArrayRef * arrayRef,
|
|||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
static Datum
|
static Datum
|
||||||
ExecEvalAggreg(Aggreg * agg, ExprContext * econtext, bool * isNull)
|
ExecEvalAggreg(Aggreg *agg, ExprContext * econtext, bool * isNull)
|
||||||
{
|
{
|
||||||
|
|
||||||
*isNull = econtext->ecxt_nulls[agg->aggno];
|
*isNull = econtext->ecxt_nulls[agg->aggno];
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.16 1997/09/08 02:22:36 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.17 1997/09/08 20:55:39 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -60,7 +60,7 @@
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
ExecGetIndexKeyInfo(IndexTupleForm indexTuple, int *numAttsOutP,
|
ExecGetIndexKeyInfo(IndexTupleForm indexTuple, int *numAttsOutP,
|
||||||
AttrNumber ** attsOutP, FuncIndexInfoPtr fInfoP);
|
AttrNumber **attsOutP, FuncIndexInfoPtr fInfoP);
|
||||||
|
|
||||||
/* ----------------------------------------------------------------
|
/* ----------------------------------------------------------------
|
||||||
* global counters for number of tuples processed, retrieved,
|
* global counters for number of tuples processed, retrieved,
|
||||||
@ -608,7 +608,7 @@ QueryDescGetTypeInfo(QueryDesc * queryDesc)
|
|||||||
static void
|
static void
|
||||||
ExecGetIndexKeyInfo(IndexTupleForm indexTuple,
|
ExecGetIndexKeyInfo(IndexTupleForm indexTuple,
|
||||||
int *numAttsOutP,
|
int *numAttsOutP,
|
||||||
AttrNumber ** attsOutP,
|
AttrNumber **attsOutP,
|
||||||
FuncIndexInfoPtr fInfoP)
|
FuncIndexInfoPtr fInfoP)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -45,9 +45,9 @@ typedef struct AggFuncInfo
|
|||||||
int xfn1_nargs;
|
int xfn1_nargs;
|
||||||
int xfn2_nargs;
|
int xfn2_nargs;
|
||||||
int finalfn_nargs;
|
int finalfn_nargs;
|
||||||
} AggFuncInfo;
|
} AggFuncInfo;
|
||||||
|
|
||||||
static Datum aggGetAttr(TupleTableSlot * tuple, Aggreg * agg, bool * isNull);
|
static Datum aggGetAttr(TupleTableSlot * tuple, Aggreg *agg, bool * isNull);
|
||||||
|
|
||||||
|
|
||||||
/* ---------------------------------------
|
/* ---------------------------------------
|
||||||
@ -88,7 +88,7 @@ static Datum aggGetAttr(TupleTableSlot * tuple, Aggreg * agg, bool * isNull);
|
|||||||
* ------------------------------------------
|
* ------------------------------------------
|
||||||
*/
|
*/
|
||||||
TupleTableSlot *
|
TupleTableSlot *
|
||||||
ExecAgg(Agg * node)
|
ExecAgg(Agg *node)
|
||||||
{
|
{
|
||||||
AggState *aggstate;
|
AggState *aggstate;
|
||||||
EState *estate;
|
EState *estate;
|
||||||
@ -488,7 +488,7 @@ ExecAgg(Agg * node)
|
|||||||
* -----------------
|
* -----------------
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
ExecInitAgg(Agg * node, EState * estate, Plan * parent)
|
ExecInitAgg(Agg *node, EState * estate, Plan * parent)
|
||||||
{
|
{
|
||||||
AggState *aggstate;
|
AggState *aggstate;
|
||||||
Plan *outerPlan;
|
Plan *outerPlan;
|
||||||
@ -551,7 +551,7 @@ ExecInitAgg(Agg * node, EState * estate, Plan * parent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ExecCountSlotsAgg(Agg * node)
|
ExecCountSlotsAgg(Agg *node)
|
||||||
{
|
{
|
||||||
return ExecCountSlotsNode(outerPlan(node)) +
|
return ExecCountSlotsNode(outerPlan(node)) +
|
||||||
ExecCountSlotsNode(innerPlan(node)) +
|
ExecCountSlotsNode(innerPlan(node)) +
|
||||||
@ -564,7 +564,7 @@ ExecCountSlotsAgg(Agg * node)
|
|||||||
* -----------------------
|
* -----------------------
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ExecEndAgg(Agg * node)
|
ExecEndAgg(Agg *node)
|
||||||
{
|
{
|
||||||
AggState *aggstate;
|
AggState *aggstate;
|
||||||
Plan *outerPlan;
|
Plan *outerPlan;
|
||||||
@ -592,7 +592,7 @@ ExecEndAgg(Agg * node)
|
|||||||
*/
|
*/
|
||||||
static Datum
|
static Datum
|
||||||
aggGetAttr(TupleTableSlot * slot,
|
aggGetAttr(TupleTableSlot * slot,
|
||||||
Aggreg * agg,
|
Aggreg *agg,
|
||||||
bool * isNull)
|
bool * isNull)
|
||||||
{
|
{
|
||||||
Datum result;
|
Datum result;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/executor/nodeAppend.c,v 1.7 1997/09/08 02:22:40 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/executor/nodeAppend.c,v 1.8 1997/09/08 20:55:41 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -64,7 +64,7 @@
|
|||||||
#include "utils/mcxt.h"
|
#include "utils/mcxt.h"
|
||||||
#include "parser/parsetree.h" /* for rt_store() macro */
|
#include "parser/parsetree.h" /* for rt_store() macro */
|
||||||
|
|
||||||
static bool exec_append_initialize_next(Append * node);
|
static bool exec_append_initialize_next(Append *node);
|
||||||
|
|
||||||
/* ----------------------------------------------------------------
|
/* ----------------------------------------------------------------
|
||||||
* exec-append-initialize-next
|
* exec-append-initialize-next
|
||||||
@ -76,7 +76,7 @@ static bool exec_append_initialize_next(Append * node);
|
|||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
static bool
|
static bool
|
||||||
exec_append_initialize_next(Append * node)
|
exec_append_initialize_next(Append *node)
|
||||||
{
|
{
|
||||||
EState *estate;
|
EState *estate;
|
||||||
AppendState *unionstate;
|
AppendState *unionstate;
|
||||||
@ -182,7 +182,7 @@ exec_append_initialize_next(Append * node)
|
|||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
ExecInitAppend(Append * node, EState * estate, Plan * parent)
|
ExecInitAppend(Append *node, EState * estate, Plan * parent)
|
||||||
{
|
{
|
||||||
AppendState *unionstate;
|
AppendState *unionstate;
|
||||||
int nplans;
|
int nplans;
|
||||||
@ -341,7 +341,7 @@ ExecInitAppend(Append * node, EState * estate, Plan * parent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ExecCountSlotsAppend(Append * node)
|
ExecCountSlotsAppend(Append *node)
|
||||||
{
|
{
|
||||||
List *plan;
|
List *plan;
|
||||||
List *unionplans = node->unionplans;
|
List *unionplans = node->unionplans;
|
||||||
@ -363,7 +363,7 @@ ExecCountSlotsAppend(Append * node)
|
|||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
TupleTableSlot *
|
TupleTableSlot *
|
||||||
ExecProcAppend(Append * node)
|
ExecProcAppend(Append *node)
|
||||||
{
|
{
|
||||||
EState *estate;
|
EState *estate;
|
||||||
AppendState *unionstate;
|
AppendState *unionstate;
|
||||||
@ -456,7 +456,7 @@ ExecProcAppend(Append * node)
|
|||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ExecEndAppend(Append * node)
|
ExecEndAppend(Append *node)
|
||||||
{
|
{
|
||||||
AppendState *unionstate;
|
AppendState *unionstate;
|
||||||
int nplans;
|
int nplans;
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
* columns. (ie. tuples from the same group are consecutive)
|
* columns. (ie. tuples from the same group are consecutive)
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/executor/nodeGroup.c,v 1.7 1997/09/08 02:22:41 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/executor/nodeGroup.c,v 1.8 1997/09/08 20:55:43 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -32,7 +32,7 @@ static TupleTableSlot *ExecGroupEveryTuple(Group * node);
|
|||||||
static TupleTableSlot *ExecGroupOneTuple(Group * node);
|
static TupleTableSlot *ExecGroupOneTuple(Group * node);
|
||||||
static bool
|
static bool
|
||||||
sameGroup(TupleTableSlot * oldslot, TupleTableSlot * newslot,
|
sameGroup(TupleTableSlot * oldslot, TupleTableSlot * newslot,
|
||||||
int numCols, AttrNumber * grpColIdx, TupleDesc tupdesc);
|
int numCols, AttrNumber *grpColIdx, TupleDesc tupdesc);
|
||||||
|
|
||||||
/* ---------------------------------------
|
/* ---------------------------------------
|
||||||
* ExecGroup -
|
* ExecGroup -
|
||||||
@ -383,7 +383,7 @@ static bool
|
|||||||
sameGroup(TupleTableSlot * oldslot,
|
sameGroup(TupleTableSlot * oldslot,
|
||||||
TupleTableSlot * newslot,
|
TupleTableSlot * newslot,
|
||||||
int numCols,
|
int numCols,
|
||||||
AttrNumber * grpColIdx,
|
AttrNumber *grpColIdx,
|
||||||
TupleDesc tupdesc)
|
TupleDesc tupdesc)
|
||||||
{
|
{
|
||||||
bool isNull1,
|
bool isNull1,
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.10 1997/09/08 02:22:46 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.11 1997/09/08 20:55:45 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -734,8 +734,7 @@ ExecMergeJoin(MergeJoin * node)
|
|||||||
* This is the case when
|
* This is the case when
|
||||||
*
|
*
|
||||||
* outer inner 4 5 - marked tuple outer tuple - 5 5
|
* outer inner 4 5 - marked tuple outer tuple - 5 5
|
||||||
* new outer tuple - 5 5 6 8 - inner tuple 7
|
* new outer tuple - 5 5 6 8 - inner tuple 7 12
|
||||||
* 12
|
|
||||||
*
|
*
|
||||||
* new outer tuple = marked tuple
|
* new outer tuple = marked tuple
|
||||||
*
|
*
|
||||||
@ -750,7 +749,8 @@ ExecMergeJoin(MergeJoin * node)
|
|||||||
*
|
*
|
||||||
* new outer tuple > marked tuple
|
* new outer tuple > marked tuple
|
||||||
*
|
*
|
||||||
*******************************
|
******************************
|
||||||
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -830,7 +830,8 @@ ExecMergeJoin(MergeJoin * node)
|
|||||||
* we have to advance the outer scan until we find the outer
|
* we have to advance the outer scan until we find the outer
|
||||||
* 8.
|
* 8.
|
||||||
*
|
*
|
||||||
*******************************
|
******************************
|
||||||
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -932,7 +933,8 @@ ExecMergeJoin(MergeJoin * node)
|
|||||||
* we have to advance the inner scan until we find the inner
|
* we have to advance the inner scan until we find the inner
|
||||||
* 12.
|
* 12.
|
||||||
*
|
*
|
||||||
*******************************
|
******************************
|
||||||
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/executor/nodeNestloop.c,v 1.5 1997/09/08 02:22:48 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/executor/nodeNestloop.c,v 1.6 1997/09/08 20:55:46 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -86,7 +86,7 @@ ExecNestLoop(NestLoop * node, Plan * parent)
|
|||||||
*/
|
*/
|
||||||
econtext = nlstate->jstate.cs_ExprContext;
|
econtext = nlstate->jstate.cs_ExprContext;
|
||||||
|
|
||||||
/* ---------------- * get the current outer tuple
|
/* ---------------- * get the current outer tuple
|
||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
outerTupleSlot = nlstate->jstate.cs_OuterTupleSlot;
|
outerTupleSlot = nlstate->jstate.cs_OuterTupleSlot;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.8 1997/09/08 02:23:29 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.9 1997/09/08 20:55:50 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -157,7 +157,7 @@ _copyResult(Result * from)
|
|||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
static Append *
|
static Append *
|
||||||
_copyAppend(Append * from)
|
_copyAppend(Append *from)
|
||||||
{
|
{
|
||||||
Append *newnode = makeNode(Append);
|
Append *newnode = makeNode(Append);
|
||||||
|
|
||||||
@ -486,7 +486,7 @@ _copySort(Sort * from)
|
|||||||
* --------------
|
* --------------
|
||||||
*/
|
*/
|
||||||
static Agg *
|
static Agg *
|
||||||
_copyAgg(Agg * from)
|
_copyAgg(Agg *from)
|
||||||
{
|
{
|
||||||
Agg *newnode = makeNode(Agg);
|
Agg *newnode = makeNode(Agg);
|
||||||
int i;
|
int i;
|
||||||
@ -870,7 +870,7 @@ _copyFunc(Func * from)
|
|||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
static Aggreg *
|
static Aggreg *
|
||||||
_copyAggreg(Aggreg * from)
|
_copyAggreg(Aggreg *from)
|
||||||
{
|
{
|
||||||
Aggreg *newnode = makeNode(Aggreg);
|
Aggreg *newnode = makeNode(Aggreg);
|
||||||
|
|
||||||
@ -890,7 +890,7 @@ _copyAggreg(Aggreg * from)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static Array *
|
static Array *
|
||||||
_copyArray(Array * from)
|
_copyArray(Array *from)
|
||||||
{
|
{
|
||||||
Array *newnode = makeNode(Array);
|
Array *newnode = makeNode(Array);
|
||||||
|
|
||||||
@ -910,7 +910,7 @@ _copyArray(Array * from)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static ArrayRef *
|
static ArrayRef *
|
||||||
_copyArrayRef(ArrayRef * from)
|
_copyArrayRef(ArrayRef *from)
|
||||||
{
|
{
|
||||||
ArrayRef *newnode = makeNode(ArrayRef);
|
ArrayRef *newnode = makeNode(ArrayRef);
|
||||||
|
|
||||||
@ -1479,7 +1479,7 @@ _copySortClause(SortClause * from)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static A_Const *
|
static A_Const *
|
||||||
_copyAConst(A_Const * from)
|
_copyAConst(A_Const *from)
|
||||||
{
|
{
|
||||||
A_Const *newnode = makeNode(A_Const);
|
A_Const *newnode = makeNode(A_Const);
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.8 1997/09/08 02:23:36 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.9 1997/09/08 20:55:52 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -138,7 +138,7 @@ _equalVar(Var * a, Var * b)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
_equalArray(Array * a, Array * b)
|
_equalArray(Array *a, Array *b)
|
||||||
{
|
{
|
||||||
if (a->arrayelemtype != b->arrayelemtype)
|
if (a->arrayelemtype != b->arrayelemtype)
|
||||||
return (false);
|
return (false);
|
||||||
@ -154,7 +154,7 @@ _equalArray(Array * a, Array * b)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
_equalArrayRef(ArrayRef * a, ArrayRef * b)
|
_equalArrayRef(ArrayRef *a, ArrayRef *b)
|
||||||
{
|
{
|
||||||
if (a->refelemtype != b->refelemtype)
|
if (a->refelemtype != b->refelemtype)
|
||||||
return (false);
|
return (false);
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.8 1997/09/08 02:23:41 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.9 1997/09/08 20:55:56 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* Every (plan) node in POSTGRES has an associated "out" routine which
|
* Every (plan) node in POSTGRES has an associated "out" routine which
|
||||||
@ -186,7 +186,7 @@ _outExistential(StringInfo str, Existential * node)
|
|||||||
* Append is a subclass of Plan.
|
* Append is a subclass of Plan.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
_outAppend(StringInfo str, Append * node)
|
_outAppend(StringInfo str, Append *node)
|
||||||
{
|
{
|
||||||
char buf[500];
|
char buf[500];
|
||||||
|
|
||||||
@ -387,7 +387,7 @@ _outSort(StringInfo str, Sort * node)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_outAgg(StringInfo str, Agg * node)
|
_outAgg(StringInfo str, Agg *node)
|
||||||
{
|
{
|
||||||
char buf[500];
|
char buf[500];
|
||||||
|
|
||||||
@ -646,7 +646,7 @@ _outConst(StringInfo str, Const * node)
|
|||||||
* Aggreg
|
* Aggreg
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
_outAggreg(StringInfo str, Aggreg * node)
|
_outAggreg(StringInfo str, Aggreg *node)
|
||||||
{
|
{
|
||||||
char buf[500];
|
char buf[500];
|
||||||
|
|
||||||
@ -670,7 +670,7 @@ _outAggreg(StringInfo str, Aggreg * node)
|
|||||||
* Array is a subclass of Expr
|
* Array is a subclass of Expr
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
_outArray(StringInfo str, Array * node)
|
_outArray(StringInfo str, Array *node)
|
||||||
{
|
{
|
||||||
char buf[500];
|
char buf[500];
|
||||||
int i;
|
int i;
|
||||||
@ -707,7 +707,7 @@ _outArray(StringInfo str, Array * node)
|
|||||||
* ArrayRef is a subclass of Expr
|
* ArrayRef is a subclass of Expr
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
_outArrayRef(StringInfo str, ArrayRef * node)
|
_outArrayRef(StringInfo str, ArrayRef *node)
|
||||||
{
|
{
|
||||||
char buf[500];
|
char buf[500];
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/predmig.c,v 1.4 1997/09/08 02:24:26 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/predmig.c,v 1.5 1997/09/08 20:56:03 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -78,7 +78,7 @@ static int xfunc_stream_compare(void *arg1, void *arg2);
|
|||||||
static bool xfunc_check_stream(Stream node);
|
static bool xfunc_check_stream(Stream node);
|
||||||
static bool xfunc_in_stream(Stream node, Stream stream);
|
static bool xfunc_in_stream(Stream node, Stream stream);
|
||||||
|
|
||||||
/* ----------------- MAIN FUNCTIONS ------------------------ */
|
/* ----------------- MAIN FUNCTIONS ------------------------ */
|
||||||
/*
|
/*
|
||||||
** xfunc_do_predmig
|
** xfunc_do_predmig
|
||||||
** wrapper for Predicate Migration. It calls xfunc_predmig until no
|
** wrapper for Predicate Migration. It calls xfunc_predmig until no
|
||||||
@ -495,7 +495,7 @@ xfunc_form_groups(Query * queryInfo, Stream root, Stream bottom)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ------------------- UTILITY FUNCTIONS ------------------------- */
|
/* ------------------- UTILITY FUNCTIONS ------------------------- */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** xfunc_free_stream --
|
** xfunc_free_stream --
|
||||||
@ -765,7 +765,7 @@ xfunc_stream_compare(void *arg1, void *arg2)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------ DEBUGGING ROUTINES ---------------------------- */
|
/* ------------------ DEBUGGING ROUTINES ---------------------------- */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Make sure all pointers in stream make sense. Make sure no joins are
|
** Make sure all pointers in stream make sense. Make sure no joins are
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.13 1997/09/08 02:24:31 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.14 1997/09/08 20:56:10 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -1113,7 +1113,7 @@ make_material(List * tlist,
|
|||||||
}
|
}
|
||||||
|
|
||||||
Agg *
|
Agg *
|
||||||
make_agg(List * tlist, int nagg, Aggreg ** aggs)
|
make_agg(List * tlist, int nagg, Aggreg **aggs)
|
||||||
{
|
{
|
||||||
Agg *node = makeNode(Agg);
|
Agg *node = makeNode(Agg);
|
||||||
|
|
||||||
@ -1133,7 +1133,7 @@ Group *
|
|||||||
make_group(List * tlist,
|
make_group(List * tlist,
|
||||||
bool tuplePerGroup,
|
bool tuplePerGroup,
|
||||||
int ngrp,
|
int ngrp,
|
||||||
AttrNumber * grpColIdx,
|
AttrNumber *grpColIdx,
|
||||||
Sort * lefttree)
|
Sort * lefttree)
|
||||||
{
|
{
|
||||||
Group *node = makeNode(Group);
|
Group *node = makeNode(Group);
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.6 1997/09/08 02:24:39 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.7 1997/09/08 20:56:16 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -686,7 +686,7 @@ OperandIsInner(Node * opnd, int inner_relid)
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
set_agg_tlist_references(Agg * aggNode)
|
set_agg_tlist_references(Agg *aggNode)
|
||||||
{
|
{
|
||||||
List *aggTargetList;
|
List *aggTargetList;
|
||||||
List *subplanTargetList;
|
List *subplanTargetList;
|
||||||
@ -704,7 +704,7 @@ set_agg_tlist_references(Agg * aggNode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
set_agg_agglist_references(Agg * aggNode)
|
set_agg_agglist_references(Agg *aggNode)
|
||||||
{
|
{
|
||||||
List *subplanTargetList;
|
List *subplanTargetList;
|
||||||
Aggreg **aggs;
|
Aggreg **aggs;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.9 1997/09/08 02:24:52 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.10 1997/09/08 20:56:19 momjian Exp $
|
||||||
*
|
*
|
||||||
* HISTORY
|
* HISTORY
|
||||||
* AUTHOR DATE MAJOR EVENT
|
* AUTHOR DATE MAJOR EVENT
|
||||||
@ -597,7 +597,7 @@ fix_opids(List * clauses)
|
|||||||
void
|
void
|
||||||
get_relattval(Node * clause,
|
get_relattval(Node * clause,
|
||||||
int *relid,
|
int *relid,
|
||||||
AttrNumber * attno,
|
AttrNumber *attno,
|
||||||
Datum * constval,
|
Datum * constval,
|
||||||
int *flag)
|
int *flag)
|
||||||
{
|
{
|
||||||
@ -728,9 +728,9 @@ get_relattval(Node * clause,
|
|||||||
void
|
void
|
||||||
get_rels_atts(Node * clause,
|
get_rels_atts(Node * clause,
|
||||||
int *relid1,
|
int *relid1,
|
||||||
AttrNumber * attno1,
|
AttrNumber *attno1,
|
||||||
int *relid2,
|
int *relid2,
|
||||||
AttrNumber * attno2)
|
AttrNumber *attno2)
|
||||||
{
|
{
|
||||||
Var *left = get_leftop((Expr *) clause);
|
Var *left = get_leftop((Expr *) clause);
|
||||||
Var *right = get_rightop((Expr *) clause);
|
Var *right = get_rightop((Expr *) clause);
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.40 1997/09/08 02:25:11 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.41 1997/09/08 20:56:25 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -47,14 +47,14 @@
|
|||||||
static Query *transformStmt(ParseState * pstate, Node * stmt);
|
static Query *transformStmt(ParseState * pstate, Node * stmt);
|
||||||
|
|
||||||
static Query *transformDeleteStmt(ParseState * pstate, DeleteStmt * stmt);
|
static Query *transformDeleteStmt(ParseState * pstate, DeleteStmt * stmt);
|
||||||
static Query *transformInsertStmt(ParseState * pstate, AppendStmt * stmt);
|
static Query *transformInsertStmt(ParseState * pstate, AppendStmt *stmt);
|
||||||
static Query *transformIndexStmt(ParseState * pstate, IndexStmt * stmt);
|
static Query *transformIndexStmt(ParseState * pstate, IndexStmt * stmt);
|
||||||
static Query *transformExtendStmt(ParseState * pstate, ExtendStmt * stmt);
|
static Query *transformExtendStmt(ParseState * pstate, ExtendStmt * stmt);
|
||||||
static Query *transformRuleStmt(ParseState * query, RuleStmt * stmt);
|
static Query *transformRuleStmt(ParseState * query, RuleStmt * stmt);
|
||||||
static Query *transformSelectStmt(ParseState * pstate, RetrieveStmt * stmt);
|
static Query *transformSelectStmt(ParseState * pstate, RetrieveStmt * stmt);
|
||||||
static Query *transformUpdateStmt(ParseState * pstate, ReplaceStmt * stmt);
|
static Query *transformUpdateStmt(ParseState * pstate, ReplaceStmt * stmt);
|
||||||
static Query *transformCursorStmt(ParseState * pstate, CursorStmt * stmt);
|
static Query *transformCursorStmt(ParseState * pstate, CursorStmt * stmt);
|
||||||
static Node *handleNestedDots(ParseState * pstate, Attr * attr, int *curr_resno);
|
static Node *handleNestedDots(ParseState * pstate, Attr *attr, int *curr_resno);
|
||||||
|
|
||||||
#define EXPR_COLUMN_FIRST 1
|
#define EXPR_COLUMN_FIRST 1
|
||||||
#define EXPR_RELATION_FIRST 2
|
#define EXPR_RELATION_FIRST 2
|
||||||
@ -89,7 +89,7 @@ static List *setup_base_tlist(Oid typeid);
|
|||||||
static void
|
static void
|
||||||
make_arguments(int nargs, List * fargs, Oid * input_typeids,
|
make_arguments(int nargs, List * fargs, Oid * input_typeids,
|
||||||
Oid * function_typeids);
|
Oid * function_typeids);
|
||||||
static void AddAggToParseState(ParseState * pstate, Aggreg * aggreg);
|
static void AddAggToParseState(ParseState * pstate, Aggreg *aggreg);
|
||||||
static void finalizeAggregates(ParseState * pstate, Query * qry);
|
static void finalizeAggregates(ParseState * pstate, Query * qry);
|
||||||
static void parseCheckAggregates(ParseState * pstate, Query * qry);
|
static void parseCheckAggregates(ParseState * pstate, Query * qry);
|
||||||
static ParseState *makeParseState(void);
|
static ParseState *makeParseState(void);
|
||||||
@ -300,7 +300,7 @@ transformDeleteStmt(ParseState * pstate, DeleteStmt * stmt)
|
|||||||
* transform an Insert Statement
|
* transform an Insert Statement
|
||||||
*/
|
*/
|
||||||
static Query *
|
static Query *
|
||||||
transformInsertStmt(ParseState * pstate, AppendStmt * stmt)
|
transformInsertStmt(ParseState * pstate, AppendStmt *stmt)
|
||||||
{
|
{
|
||||||
Query *qry = makeNode(Query); /* make a new query tree */
|
Query *qry = makeNode(Query); /* make a new query tree */
|
||||||
|
|
||||||
@ -1872,7 +1872,7 @@ transformSortClause(ParseState * pstate,
|
|||||||
** a tree with of Iter and Func nodes.
|
** a tree with of Iter and Func nodes.
|
||||||
*/
|
*/
|
||||||
static Node *
|
static Node *
|
||||||
handleNestedDots(ParseState * pstate, Attr * attr, int *curr_resno)
|
handleNestedDots(ParseState * pstate, Attr *attr, int *curr_resno)
|
||||||
{
|
{
|
||||||
List *mutator_iter;
|
List *mutator_iter;
|
||||||
Node *retval = NULL;
|
Node *retval = NULL;
|
||||||
@ -2524,7 +2524,7 @@ ParseFunc(ParseState * pstate, char *funcname, List * fargs, int *curr_resno)
|
|||||||
* SIDE EFFECT: aggno in target list entry will be modified
|
* SIDE EFFECT: aggno in target list entry will be modified
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
AddAggToParseState(ParseState * pstate, Aggreg * aggreg)
|
AddAggToParseState(ParseState * pstate, Aggreg *aggreg)
|
||||||
{
|
{
|
||||||
List *ag;
|
List *ag;
|
||||||
int i;
|
int i;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.55 1997/09/08 02:27:53 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.56 1997/09/08 20:56:38 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
*
|
*
|
||||||
@ -112,7 +112,7 @@
|
|||||||
typedef struct bkend
|
typedef struct bkend
|
||||||
{
|
{
|
||||||
int pid; /* process id of backend */
|
int pid; /* process id of backend */
|
||||||
} Backend;
|
} Backend;
|
||||||
|
|
||||||
/* list of active backends. For garbage collection only now. */
|
/* list of active backends. For garbage collection only now. */
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_table.c,v 1.6 1997/09/08 02:28:29 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_table.c,v 1.7 1997/09/08 20:56:41 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -101,7 +101,7 @@ BufTableLookup(BufferTag * tagPtr)
|
|||||||
* BufTableDelete
|
* BufTableDelete
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
BufTableDelete(BufferDesc * buf)
|
BufTableDelete(BufferDesc *buf)
|
||||||
{
|
{
|
||||||
LookupEnt *result;
|
LookupEnt *result;
|
||||||
bool found;
|
bool found;
|
||||||
@ -130,7 +130,7 @@ BufTableDelete(BufferDesc * buf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
BufTableInsert(BufferDesc * buf)
|
BufTableInsert(BufferDesc *buf)
|
||||||
{
|
{
|
||||||
LookupEnt *result;
|
LookupEnt *result;
|
||||||
bool found;
|
bool found;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.21 1997/09/08 02:28:32 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.22 1997/09/08 20:56:44 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -80,10 +80,10 @@ extern long int LocalBufferFlushCount;
|
|||||||
static int WriteMode = BUFFER_LATE_WRITE; /* Delayed write is
|
static int WriteMode = BUFFER_LATE_WRITE; /* Delayed write is
|
||||||
* default */
|
* default */
|
||||||
|
|
||||||
static void WaitIO(BufferDesc * buf, SPINLOCK spinlock);
|
static void WaitIO(BufferDesc *buf, SPINLOCK spinlock);
|
||||||
|
|
||||||
#ifndef HAS_TEST_AND_SET
|
#ifndef HAS_TEST_AND_SET
|
||||||
static void SignalIO(BufferDesc * buf);
|
static void SignalIO(BufferDesc *buf);
|
||||||
extern long *NWaitIOBackendP; /* defined in buf_init.c */
|
extern long *NWaitIOBackendP; /* defined in buf_init.c */
|
||||||
|
|
||||||
#endif /* HAS_TEST_AND_SET */
|
#endif /* HAS_TEST_AND_SET */
|
||||||
@ -96,7 +96,7 @@ BufferAlloc(Relation reln, BlockNumber blockNum,
|
|||||||
bool * foundPtr, bool bufferLockHeld);
|
bool * foundPtr, bool bufferLockHeld);
|
||||||
static int FlushBuffer(Buffer buffer, bool release);
|
static int FlushBuffer(Buffer buffer, bool release);
|
||||||
static void BufferSync(void);
|
static void BufferSync(void);
|
||||||
static int BufferReplace(BufferDesc * bufHdr, bool bufferLockHeld);
|
static int BufferReplace(BufferDesc *bufHdr, bool bufferLockHeld);
|
||||||
|
|
||||||
/* ---------------------------------------------------
|
/* ---------------------------------------------------
|
||||||
* RelationGetBufferWithBuffer
|
* RelationGetBufferWithBuffer
|
||||||
@ -1105,7 +1105,7 @@ BufferSync()
|
|||||||
*/
|
*/
|
||||||
#ifdef HAS_TEST_AND_SET
|
#ifdef HAS_TEST_AND_SET
|
||||||
static void
|
static void
|
||||||
WaitIO(BufferDesc * buf, SPINLOCK spinlock)
|
WaitIO(BufferDesc *buf, SPINLOCK spinlock)
|
||||||
{
|
{
|
||||||
SpinRelease(spinlock);
|
SpinRelease(spinlock);
|
||||||
S_LOCK(&(buf->io_in_progress_lock));
|
S_LOCK(&(buf->io_in_progress_lock));
|
||||||
@ -1117,7 +1117,7 @@ WaitIO(BufferDesc * buf, SPINLOCK spinlock)
|
|||||||
IpcSemaphoreId WaitIOSemId;
|
IpcSemaphoreId WaitIOSemId;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
WaitIO(BufferDesc * buf, SPINLOCK spinlock)
|
WaitIO(BufferDesc *buf, SPINLOCK spinlock)
|
||||||
{
|
{
|
||||||
bool inProgress;
|
bool inProgress;
|
||||||
|
|
||||||
@ -1139,7 +1139,7 @@ WaitIO(BufferDesc * buf, SPINLOCK spinlock)
|
|||||||
* SignalIO --
|
* SignalIO --
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
SignalIO(BufferDesc * buf)
|
SignalIO(BufferDesc *buf)
|
||||||
{
|
{
|
||||||
/* somebody better be waiting. */
|
/* somebody better be waiting. */
|
||||||
Assert(buf->refcount > 1);
|
Assert(buf->refcount > 1);
|
||||||
@ -1346,7 +1346,7 @@ BufferGetRelation(Buffer buffer)
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
BufferReplace(BufferDesc * bufHdr, bool bufferLockHeld)
|
BufferReplace(BufferDesc *bufHdr, bool bufferLockHeld)
|
||||||
{
|
{
|
||||||
Relation reln;
|
Relation reln;
|
||||||
Oid bufdb,
|
Oid bufdb,
|
||||||
@ -1410,8 +1410,8 @@ BlockNumber
|
|||||||
RelationGetNumberOfBlocks(Relation relation)
|
RelationGetNumberOfBlocks(Relation relation)
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
((relation->rd_islocal) ? relation->rd_nblocks :
|
((relation->rd_islocal) ? relation->rd_nblocks :
|
||||||
smgrnblocks(relation->rd_rel->relsmgr, relation));
|
smgrnblocks(relation->rd_rel->relsmgr, relation));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/freelist.c,v 1.6 1997/09/08 02:28:33 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/freelist.c,v 1.7 1997/09/08 20:56:47 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -59,7 +59,7 @@ extern SPINLOCK BufMgrLock;
|
|||||||
* Currently, they are added on an LRU basis.
|
* Currently, they are added on an LRU basis.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
AddBufferToFreelist(BufferDesc * bf)
|
AddBufferToFreelist(BufferDesc *bf)
|
||||||
{
|
{
|
||||||
#ifdef BMTRACE
|
#ifdef BMTRACE
|
||||||
_bm_trace(bf->tag.relId.dbId, bf->tag.relId.relId, bf->tag.blockNum,
|
_bm_trace(bf->tag.relId.dbId, bf->tag.relId.relId, bf->tag.blockNum,
|
||||||
@ -82,7 +82,7 @@ AddBufferToFreelist(BufferDesc * bf)
|
|||||||
* PinBuffer -- make buffer unavailable for replacement.
|
* PinBuffer -- make buffer unavailable for replacement.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
PinBuffer(BufferDesc * buf)
|
PinBuffer(BufferDesc *buf)
|
||||||
{
|
{
|
||||||
long b;
|
long b;
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ PinBuffer(BufferDesc * buf)
|
|||||||
|
|
||||||
#ifdef NOT_USED
|
#ifdef NOT_USED
|
||||||
void
|
void
|
||||||
PinBuffer_Debug(char *file, int line, BufferDesc * buf)
|
PinBuffer_Debug(char *file, int line, BufferDesc *buf)
|
||||||
{
|
{
|
||||||
PinBuffer(buf);
|
PinBuffer(buf);
|
||||||
if (ShowPinTrace)
|
if (ShowPinTrace)
|
||||||
@ -136,7 +136,7 @@ refcount = %ld, file: %s, line: %d\n",
|
|||||||
* UnpinBuffer -- make buffer available for replacement.
|
* UnpinBuffer -- make buffer available for replacement.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
UnpinBuffer(BufferDesc * buf)
|
UnpinBuffer(BufferDesc *buf)
|
||||||
{
|
{
|
||||||
long b = BufferDescriptorGetBuffer(buf) - 1;
|
long b = BufferDescriptorGetBuffer(buf) - 1;
|
||||||
|
|
||||||
@ -160,7 +160,7 @@ UnpinBuffer(BufferDesc * buf)
|
|||||||
|
|
||||||
#ifdef NOT_USED
|
#ifdef NOT_USED
|
||||||
void
|
void
|
||||||
UnpinBuffer_Debug(char *file, int line, BufferDesc * buf)
|
UnpinBuffer_Debug(char *file, int line, BufferDesc *buf)
|
||||||
{
|
{
|
||||||
UnpinBuffer(buf);
|
UnpinBuffer(buf);
|
||||||
if (ShowPinTrace)
|
if (ShowPinTrace)
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.15 1997/09/08 02:29:06 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.16 1997/09/08 20:56:50 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -66,7 +66,7 @@
|
|||||||
static HeapTuple
|
static HeapTuple
|
||||||
inv_newtuple(LargeObjectDesc * obj_desc, Buffer buffer,
|
inv_newtuple(LargeObjectDesc * obj_desc, Buffer buffer,
|
||||||
Page page, char *dbuf, int nwrite);
|
Page page, char *dbuf, int nwrite);
|
||||||
static HeapTuple inv_fetchtup(LargeObjectDesc * obj_desc, Buffer * bufP);
|
static HeapTuple inv_fetchtup(LargeObjectDesc * obj_desc, Buffer *bufP);
|
||||||
static int inv_wrnew(LargeObjectDesc * obj_desc, char *buf, int nbytes);
|
static int inv_wrnew(LargeObjectDesc * obj_desc, char *buf, int nbytes);
|
||||||
static int
|
static int
|
||||||
inv_wrold(LargeObjectDesc * obj_desc, char *dbuf, int nbytes,
|
inv_wrold(LargeObjectDesc * obj_desc, char *dbuf, int nbytes,
|
||||||
@ -576,7 +576,7 @@ inv_write(LargeObjectDesc * obj_desc, char *buf, int nbytes)
|
|||||||
* such tuple exists.
|
* such tuple exists.
|
||||||
*/
|
*/
|
||||||
static HeapTuple
|
static HeapTuple
|
||||||
inv_fetchtup(LargeObjectDesc * obj_desc, Buffer * bufP)
|
inv_fetchtup(LargeObjectDesc * obj_desc, Buffer *bufP)
|
||||||
{
|
{
|
||||||
HeapTuple htup;
|
HeapTuple htup;
|
||||||
RetrieveIndexResult res;
|
RetrieveIndexResult res;
|
||||||
@ -1035,7 +1035,7 @@ inv_newtuple(LargeObjectDesc * obj_desc,
|
|||||||
* * mer fixed disk layout of varlenas to get rid of the need for
|
* * mer fixed disk layout of varlenas to get rid of the need for
|
||||||
* this. *
|
* this. *
|
||||||
*
|
*
|
||||||
*((int32 *) attptr) = nwrite + sizeof(int32); * attptr +=
|
* ((int32 *) attptr) = nwrite + sizeof(int32); * attptr +=
|
||||||
* sizeof(int32);
|
* sizeof(int32);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/tcop/Attic/aclchk.c,v 1.15 1997/09/08 02:29:40 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/tcop/Attic/aclchk.c,v 1.16 1997/09/08 20:56:53 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* See acl.h.
|
* See acl.h.
|
||||||
@ -36,7 +36,7 @@
|
|||||||
#include "parser/catalog_utils.h"
|
#include "parser/catalog_utils.h"
|
||||||
#include "fmgr.h"
|
#include "fmgr.h"
|
||||||
|
|
||||||
static int32 aclcheck(Acl * acl, AclId id, AclIdType idtype, AclMode mode);
|
static int32 aclcheck(Acl *acl, AclId id, AclIdType idtype, AclMode mode);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Enable use of user relations in place of real system catalogs.
|
* Enable use of user relations in place of real system catalogs.
|
||||||
@ -69,7 +69,7 @@ char *aclcheck_error_strings[] = {
|
|||||||
|
|
||||||
#ifdef ACLDEBUG_TRACE
|
#ifdef ACLDEBUG_TRACE
|
||||||
static
|
static
|
||||||
dumpacl(Acl * acl)
|
dumpacl(Acl *acl)
|
||||||
{
|
{
|
||||||
register unsigned i;
|
register unsigned i;
|
||||||
AclItem *aip;
|
AclItem *aip;
|
||||||
@ -88,7 +88,7 @@ dumpacl(Acl * acl)
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ChangeAcl(char *relname,
|
ChangeAcl(char *relname,
|
||||||
AclItem * mod_aip,
|
AclItem *mod_aip,
|
||||||
unsigned modechg)
|
unsigned modechg)
|
||||||
{
|
{
|
||||||
register unsigned i;
|
register unsigned i;
|
||||||
@ -277,7 +277,7 @@ in_group(AclId uid, AclId gid)
|
|||||||
* any one of the requirements of 'mode'. Returns 0 otherwise.
|
* any one of the requirements of 'mode'. Returns 0 otherwise.
|
||||||
*/
|
*/
|
||||||
static int32
|
static int32
|
||||||
aclcheck(Acl * acl, AclId id, AclIdType idtype, AclMode mode)
|
aclcheck(Acl *acl, AclId id, AclIdType idtype, AclMode mode)
|
||||||
{
|
{
|
||||||
register unsigned i;
|
register unsigned i;
|
||||||
register AclItem *aip,
|
register AclItem *aip,
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: tgRecipe.h,v 1.3 1997/09/08 02:30:12 momjian Exp $
|
* $Id: tgRecipe.h,v 1.4 1997/09/08 20:57:05 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -29,6 +29,7 @@ typedef struct
|
|||||||
y;
|
y;
|
||||||
} Point; /* this should match whatever is in
|
} Point; /* this should match whatever is in
|
||||||
|
|
||||||
|
*
|
||||||
*
|
*
|
||||||
* geo-decls.h */
|
* geo-decls.h */
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.15 1997/09/08 02:30:15 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.16 1997/09/08 20:57:16 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -22,9 +22,9 @@
|
|||||||
#include "miscadmin.h"
|
#include "miscadmin.h"
|
||||||
|
|
||||||
static char *getid(char *s, char *n);
|
static char *getid(char *s, char *n);
|
||||||
static int32 aclitemeq(AclItem * a1, AclItem * a2);
|
static int32 aclitemeq(AclItem *a1, AclItem *a2);
|
||||||
static int32 aclitemgt(AclItem * a1, AclItem * a2);
|
static int32 aclitemgt(AclItem *a1, AclItem *a2);
|
||||||
static char *aclparse(char *s, AclItem * aip, unsigned *modechg);
|
static char *aclparse(char *s, AclItem *aip, unsigned *modechg);
|
||||||
|
|
||||||
#define ACL_IDTYPE_GID_KEYWORD "group"
|
#define ACL_IDTYPE_GID_KEYWORD "group"
|
||||||
#define ACL_IDTYPE_UID_KEYWORD "user"
|
#define ACL_IDTYPE_UID_KEYWORD "user"
|
||||||
@ -83,7 +83,7 @@ getid(char *s, char *n)
|
|||||||
* - loads 'modechg' with the mode change flag.
|
* - loads 'modechg' with the mode change flag.
|
||||||
*/
|
*/
|
||||||
static char *
|
static char *
|
||||||
aclparse(char *s, AclItem * aip, unsigned *modechg)
|
aclparse(char *s, AclItem *aip, unsigned *modechg)
|
||||||
{
|
{
|
||||||
HeapTuple htp;
|
HeapTuple htp;
|
||||||
char name[NAMEDATALEN];
|
char name[NAMEDATALEN];
|
||||||
@ -240,7 +240,7 @@ aclitemin(char *s)
|
|||||||
* the new string
|
* the new string
|
||||||
*/
|
*/
|
||||||
char *
|
char *
|
||||||
aclitemout(AclItem * aip)
|
aclitemout(AclItem *aip)
|
||||||
{
|
{
|
||||||
register char *p;
|
register char *p;
|
||||||
char *out;
|
char *out;
|
||||||
@ -312,7 +312,7 @@ aclitemout(AclItem * aip)
|
|||||||
* a boolean value indicating = or >
|
* a boolean value indicating = or >
|
||||||
*/
|
*/
|
||||||
static int32
|
static int32
|
||||||
aclitemeq(AclItem * a1, AclItem * a2)
|
aclitemeq(AclItem *a1, AclItem *a2)
|
||||||
{
|
{
|
||||||
if (!a1 && !a2)
|
if (!a1 && !a2)
|
||||||
return (1);
|
return (1);
|
||||||
@ -322,7 +322,7 @@ aclitemeq(AclItem * a1, AclItem * a2)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int32
|
static int32
|
||||||
aclitemgt(AclItem * a1, AclItem * a2)
|
aclitemgt(AclItem *a1, AclItem *a2)
|
||||||
{
|
{
|
||||||
if (a1 && !a2)
|
if (a1 && !a2)
|
||||||
return (1);
|
return (1);
|
||||||
@ -364,7 +364,7 @@ acldefault(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Acl *
|
Acl *
|
||||||
aclinsert3(Acl * old_acl, AclItem * mod_aip, unsigned modechg)
|
aclinsert3(Acl *old_acl, AclItem *mod_aip, unsigned modechg)
|
||||||
{
|
{
|
||||||
Acl *new_acl;
|
Acl *new_acl;
|
||||||
AclItem *old_aip,
|
AclItem *old_aip,
|
||||||
@ -481,13 +481,13 @@ aclinsert3(Acl * old_acl, AclItem * mod_aip, unsigned modechg)
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
Acl *
|
Acl *
|
||||||
aclinsert(Acl * old_acl, AclItem * mod_aip)
|
aclinsert(Acl *old_acl, AclItem *mod_aip)
|
||||||
{
|
{
|
||||||
return (aclinsert3(old_acl, mod_aip, ACL_MODECHG_EQL));
|
return (aclinsert3(old_acl, mod_aip, ACL_MODECHG_EQL));
|
||||||
}
|
}
|
||||||
|
|
||||||
Acl *
|
Acl *
|
||||||
aclremove(Acl * old_acl, AclItem * mod_aip)
|
aclremove(Acl *old_acl, AclItem *mod_aip)
|
||||||
{
|
{
|
||||||
Acl *new_acl;
|
Acl *new_acl;
|
||||||
AclItem *old_aip,
|
AclItem *old_aip,
|
||||||
@ -547,7 +547,7 @@ aclremove(Acl * old_acl, AclItem * mod_aip)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32
|
int32
|
||||||
aclcontains(Acl * acl, AclItem * aip)
|
aclcontains(Acl *acl, AclItem *aip)
|
||||||
{
|
{
|
||||||
unsigned i,
|
unsigned i,
|
||||||
num;
|
num;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.17 1997/09/08 02:30:19 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.18 1997/09/08 20:57:21 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -70,14 +70,14 @@ static char *_AdvanceBy1word(char *str, char **word);
|
|||||||
#endif
|
#endif
|
||||||
static void
|
static void
|
||||||
_ArrayRange(int st[], int endp[], int bsize, char *destPtr,
|
_ArrayRange(int st[], int endp[], int bsize, char *destPtr,
|
||||||
ArrayType * array, int from);
|
ArrayType *array, int from);
|
||||||
static int _ArrayClipCount(int stI[], int endpI[], ArrayType * array);
|
static int _ArrayClipCount(int stI[], int endpI[], ArrayType *array);
|
||||||
static void
|
static void
|
||||||
_LOArrayRange(int st[], int endp[], int bsize, int srcfd,
|
_LOArrayRange(int st[], int endp[], int bsize, int srcfd,
|
||||||
int destfd, ArrayType * array, int isSrcLO, bool * isNull);
|
int destfd, ArrayType *array, int isSrcLO, bool * isNull);
|
||||||
static void
|
static void
|
||||||
_ReadArray(int st[], int endp[], int bsize, int srcfd, int destfd,
|
_ReadArray(int st[], int endp[], int bsize, int srcfd, int destfd,
|
||||||
ArrayType * array, int isDestLO, bool * isNull);
|
ArrayType *array, int isDestLO, bool * isNull);
|
||||||
static ArrayCastAndSet(char *src, bool typbyval, int typlen, char *dest);
|
static ArrayCastAndSet(char *src, bool typbyval, int typlen, char *dest);
|
||||||
static SanityCheckInput(int ndim, int n, int dim[], int lb[], int indx[]);
|
static SanityCheckInput(int ndim, int n, int dim[], int lb[], int indx[]);
|
||||||
static int array_read(char *destptr, int eltsize, int nitems, char *srcptr);
|
static int array_read(char *destptr, int eltsize, int nitems, char *srcptr);
|
||||||
@ -613,7 +613,7 @@ _CopyArrayEls(char **values,
|
|||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
char *
|
char *
|
||||||
array_out(ArrayType * v, Oid element_type)
|
array_out(ArrayType *v, Oid element_type)
|
||||||
{
|
{
|
||||||
int typlen;
|
int typlen;
|
||||||
bool typbyval;
|
bool typbyval;
|
||||||
@ -771,7 +771,7 @@ array_out(ArrayType * v, Oid element_type)
|
|||||||
*----------------------------------------------------------------------------
|
*----------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
char *
|
char *
|
||||||
array_dims(ArrayType * v, bool * isNull)
|
array_dims(ArrayType *v, bool * isNull)
|
||||||
{
|
{
|
||||||
char *p,
|
char *p,
|
||||||
*save_p;
|
*save_p;
|
||||||
@ -810,7 +810,7 @@ array_dims(ArrayType * v, bool * isNull)
|
|||||||
*---------------------------------------------------------------------------
|
*---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
Datum
|
Datum
|
||||||
array_ref(ArrayType * array,
|
array_ref(ArrayType *array,
|
||||||
int n,
|
int n,
|
||||||
int indx[],
|
int indx[],
|
||||||
int reftype,
|
int reftype,
|
||||||
@ -931,7 +931,7 @@ array_ref(ArrayType * array,
|
|||||||
*-----------------------------------------------------------------------------
|
*-----------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
Datum
|
Datum
|
||||||
array_clip(ArrayType * array,
|
array_clip(ArrayType *array,
|
||||||
int n,
|
int n,
|
||||||
int upperIndx[],
|
int upperIndx[],
|
||||||
int lowerIndx[],
|
int lowerIndx[],
|
||||||
@ -1073,7 +1073,7 @@ array_clip(ArrayType * array,
|
|||||||
*-----------------------------------------------------------------------------
|
*-----------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
char *
|
char *
|
||||||
array_set(ArrayType * array,
|
array_set(ArrayType *array,
|
||||||
int n,
|
int n,
|
||||||
int indx[],
|
int indx[],
|
||||||
char *dataPtr,
|
char *dataPtr,
|
||||||
@ -1208,11 +1208,11 @@ array_set(ArrayType * array,
|
|||||||
*----------------------------------------------------------------------------
|
*----------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
char *
|
char *
|
||||||
array_assgn(ArrayType * array,
|
array_assgn(ArrayType *array,
|
||||||
int n,
|
int n,
|
||||||
int upperIndx[],
|
int upperIndx[],
|
||||||
int lowerIndx[],
|
int lowerIndx[],
|
||||||
ArrayType * newArr,
|
ArrayType *newArr,
|
||||||
int reftype,
|
int reftype,
|
||||||
int len,
|
int len,
|
||||||
bool * isNull)
|
bool * isNull)
|
||||||
@ -1283,7 +1283,7 @@ array_assgn(ArrayType * array,
|
|||||||
*-----------------------------------------------------------------------------
|
*-----------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
array_eq(ArrayType * array1, ArrayType * array2)
|
array_eq(ArrayType *array1, ArrayType *array2)
|
||||||
{
|
{
|
||||||
if ((array1 == NULL) || (array2 == NULL))
|
if ((array1 == NULL) || (array2 == NULL))
|
||||||
return (0);
|
return (0);
|
||||||
@ -1445,7 +1445,7 @@ _ArrayRange(int st[],
|
|||||||
int endp[],
|
int endp[],
|
||||||
int bsize,
|
int bsize,
|
||||||
char *destPtr,
|
char *destPtr,
|
||||||
ArrayType * array,
|
ArrayType *array,
|
||||||
int from)
|
int from)
|
||||||
{
|
{
|
||||||
int n,
|
int n,
|
||||||
@ -1487,7 +1487,7 @@ _ArrayRange(int st[],
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_ArrayClipCount(int stI[], int endpI[], ArrayType * array)
|
_ArrayClipCount(int stI[], int endpI[], ArrayType *array)
|
||||||
{
|
{
|
||||||
int n,
|
int n,
|
||||||
*dim,
|
*dim,
|
||||||
@ -1568,7 +1568,7 @@ _LOArrayRange(int st[],
|
|||||||
int bsize,
|
int bsize,
|
||||||
int srcfd,
|
int srcfd,
|
||||||
int destfd,
|
int destfd,
|
||||||
ArrayType * array,
|
ArrayType *array,
|
||||||
int isSrcLO,
|
int isSrcLO,
|
||||||
bool * isNull)
|
bool * isNull)
|
||||||
{
|
{
|
||||||
@ -1622,7 +1622,7 @@ _ReadArray(int st[],
|
|||||||
int bsize,
|
int bsize,
|
||||||
int srcfd,
|
int srcfd,
|
||||||
int destfd,
|
int destfd,
|
||||||
ArrayType * array,
|
ArrayType *array,
|
||||||
int isDestLO,
|
int isDestLO,
|
||||||
bool * isNull)
|
bool * isNull)
|
||||||
{
|
{
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/char.c,v 1.9 1997/09/08 02:30:29 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/adt/char.c,v 1.10 1997/09/08 20:57:22 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -138,46 +138,55 @@ chareq(int8 arg1, int8 arg2)
|
|||||||
{
|
{
|
||||||
return (arg1 == arg2);
|
return (arg1 == arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
charne(int8 arg1, int8 arg2)
|
charne(int8 arg1, int8 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 != arg2);
|
return (arg1 != arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
charlt(int8 arg1, int8 arg2)
|
charlt(int8 arg1, int8 arg2)
|
||||||
{
|
{
|
||||||
return ((uint8) arg1 < (uint8) arg2);
|
return ((uint8) arg1 < (uint8) arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
charle(int8 arg1, int8 arg2)
|
charle(int8 arg1, int8 arg2)
|
||||||
{
|
{
|
||||||
return ((uint8) arg1 <= (uint8) arg2);
|
return ((uint8) arg1 <= (uint8) arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
chargt(int8 arg1, int8 arg2)
|
chargt(int8 arg1, int8 arg2)
|
||||||
{
|
{
|
||||||
return ((uint8) arg1 > (uint8) arg2);
|
return ((uint8) arg1 > (uint8) arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
charge(int8 arg1, int8 arg2)
|
charge(int8 arg1, int8 arg2)
|
||||||
{
|
{
|
||||||
return ((uint8) arg1 >= (uint8) arg2);
|
return ((uint8) arg1 >= (uint8) arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
int8
|
int8
|
||||||
charpl(int8 arg1, int8 arg2)
|
charpl(int8 arg1, int8 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 + arg2);
|
return (arg1 + arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
int8
|
int8
|
||||||
charmi(int8 arg1, int8 arg2)
|
charmi(int8 arg1, int8 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 - arg2);
|
return (arg1 - arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
int8
|
int8
|
||||||
charmul(int8 arg1, int8 arg2)
|
charmul(int8 arg1, int8 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 * arg2);
|
return (arg1 * arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
int8
|
int8
|
||||||
chardiv(int8 arg1, int8 arg2)
|
chardiv(int8 arg1, int8 arg2)
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/chunk.c,v 1.8 1997/09/08 02:30:31 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/chunk.c,v 1.9 1997/09/08 20:57:24 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -439,7 +439,7 @@ _ReadChunkArray(int st[],
|
|||||||
int bsize,
|
int bsize,
|
||||||
int fp,
|
int fp,
|
||||||
char *destfp,
|
char *destfp,
|
||||||
ArrayType * array,
|
ArrayType *array,
|
||||||
int isDestLO,
|
int isDestLO,
|
||||||
bool * isNull)
|
bool * isNull)
|
||||||
{
|
{
|
||||||
@ -637,7 +637,7 @@ struct varlena *
|
|||||||
_ReadChunkArray1El(int st[],
|
_ReadChunkArray1El(int st[],
|
||||||
int bsize,
|
int bsize,
|
||||||
int fp,
|
int fp,
|
||||||
ArrayType * array,
|
ArrayType *array,
|
||||||
bool * isNull)
|
bool * isNull)
|
||||||
{
|
{
|
||||||
int i,
|
int i,
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.16 1997/09/08 02:30:32 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.17 1997/09/08 20:57:26 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* This code is actually (almost) unused.
|
* This code is actually (almost) unused.
|
||||||
@ -104,8 +104,8 @@ static int correct_dir(char direction[], int *signptr);
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
istinterval(char *i_string,
|
istinterval(char *i_string,
|
||||||
AbsoluteTime * i_start,
|
AbsoluteTime *i_start,
|
||||||
AbsoluteTime * i_end);
|
AbsoluteTime *i_end);
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* USER I/O ROUTINES *
|
* USER I/O ROUTINES *
|
||||||
@ -952,8 +952,8 @@ correct_dir(char direction[], int *signptr)
|
|||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
istinterval(char *i_string,
|
istinterval(char *i_string,
|
||||||
AbsoluteTime * i_start,
|
AbsoluteTime *i_start,
|
||||||
AbsoluteTime * i_end)
|
AbsoluteTime *i_end)
|
||||||
{
|
{
|
||||||
register char *p,
|
register char *p,
|
||||||
*p1;
|
*p1;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.21 1997/09/08 02:30:42 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.22 1997/09/08 20:57:29 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -31,10 +31,10 @@
|
|||||||
static int point_inside(Point * p, int npts, Point plist[]);
|
static int point_inside(Point * p, int npts, Point plist[]);
|
||||||
static int lseg_crossing(double x, double y, double px, double py);
|
static int lseg_crossing(double x, double y, double px, double py);
|
||||||
static BOX *box_construct(double x1, double x2, double y1, double y2);
|
static BOX *box_construct(double x1, double x2, double y1, double y2);
|
||||||
static BOX *box_copy(BOX * box);
|
static BOX *box_copy(BOX *box);
|
||||||
static BOX *box_fill(BOX * result, double x1, double x2, double y1, double y2);
|
static BOX *box_fill(BOX *result, double x1, double x2, double y1, double y2);
|
||||||
static double box_ht(BOX * box);
|
static double box_ht(BOX *box);
|
||||||
static double box_wd(BOX * box);
|
static double box_wd(BOX *box);
|
||||||
static double circle_ar(CIRCLE * circle);
|
static double circle_ar(CIRCLE * circle);
|
||||||
static CIRCLE *circle_copy(CIRCLE * circle);
|
static CIRCLE *circle_copy(CIRCLE * circle);
|
||||||
static LINE *line_construct_pm(Point * pt, double m);
|
static LINE *line_construct_pm(Point * pt, double m);
|
||||||
@ -57,7 +57,7 @@ static int pair_count(char *s, char delim);
|
|||||||
static int path_decode(int opentype, int npts, char *str, int *isopen, char **ss, Point * p);
|
static int path_decode(int opentype, int npts, char *str, int *isopen, char **ss, Point * p);
|
||||||
static char *path_encode(bool closed, int npts, Point * pt);
|
static char *path_encode(bool closed, int npts, Point * pt);
|
||||||
static void statlseg_construct(LSEG * lseg, Point * pt1, Point * pt2);
|
static void statlseg_construct(LSEG * lseg, Point * pt1, Point * pt2);
|
||||||
static double box_ar(BOX * box);
|
static double box_ar(BOX *box);
|
||||||
static Point *interpt_sl(LSEG * lseg, LINE * line);
|
static Point *interpt_sl(LSEG * lseg, LINE * line);
|
||||||
static LINE *line_construct_pp(Point * pt1, Point * pt2);
|
static LINE *line_construct_pp(Point * pt1, Point * pt2);
|
||||||
|
|
||||||
@ -384,7 +384,7 @@ box_in(char *str)
|
|||||||
/* box_out - convert a box to external form.
|
/* box_out - convert a box to external form.
|
||||||
*/
|
*/
|
||||||
char *
|
char *
|
||||||
box_out(BOX * box)
|
box_out(BOX *box)
|
||||||
{
|
{
|
||||||
if (!PointerIsValid(box))
|
if (!PointerIsValid(box))
|
||||||
return (NULL);
|
return (NULL);
|
||||||
@ -407,7 +407,7 @@ box_construct(double x1, double x2, double y1, double y2)
|
|||||||
/* box_fill - fill in a static box
|
/* box_fill - fill in a static box
|
||||||
*/
|
*/
|
||||||
static BOX *
|
static BOX *
|
||||||
box_fill(BOX * result, double x1, double x2, double y1, double y2)
|
box_fill(BOX *result, double x1, double x2, double y1, double y2)
|
||||||
{
|
{
|
||||||
if (x1 > x2)
|
if (x1 > x2)
|
||||||
{
|
{
|
||||||
@ -437,7 +437,7 @@ box_fill(BOX * result, double x1, double x2, double y1, double y2)
|
|||||||
/* box_copy - copy a box
|
/* box_copy - copy a box
|
||||||
*/
|
*/
|
||||||
static BOX *
|
static BOX *
|
||||||
box_copy(BOX * box)
|
box_copy(BOX *box)
|
||||||
{
|
{
|
||||||
BOX *result = PALLOCTYPE(BOX);
|
BOX *result = PALLOCTYPE(BOX);
|
||||||
|
|
||||||
@ -455,7 +455,7 @@ box_copy(BOX * box)
|
|||||||
/* box_same - are two boxes identical?
|
/* box_same - are two boxes identical?
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
box_same(BOX * box1, BOX * box2)
|
box_same(BOX *box1, BOX *box2)
|
||||||
{
|
{
|
||||||
return ((FPeq(box1->high.x, box2->high.x) && FPeq(box1->low.x, box2->low.x)) &&
|
return ((FPeq(box1->high.x, box2->high.x) && FPeq(box1->low.x, box2->low.x)) &&
|
||||||
(FPeq(box1->high.y, box2->high.y) && FPeq(box1->low.y, box2->low.y)));
|
(FPeq(box1->high.y, box2->high.y) && FPeq(box1->low.y, box2->low.y)));
|
||||||
@ -464,7 +464,7 @@ box_same(BOX * box1, BOX * box2)
|
|||||||
/* box_overlap - does box1 overlap box2?
|
/* box_overlap - does box1 overlap box2?
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
box_overlap(BOX * box1, BOX * box2)
|
box_overlap(BOX *box1, BOX *box2)
|
||||||
{
|
{
|
||||||
return (((FPge(box1->high.x, box2->high.x) && FPle(box1->low.x, box2->high.x)) ||
|
return (((FPge(box1->high.x, box2->high.x) && FPle(box1->low.x, box2->high.x)) ||
|
||||||
(FPge(box2->high.x, box1->high.x) && FPle(box2->low.x, box1->high.x))) &&
|
(FPge(box2->high.x, box1->high.x) && FPle(box2->low.x, box1->high.x))) &&
|
||||||
@ -479,7 +479,7 @@ box_overlap(BOX * box1, BOX * box2)
|
|||||||
* when time ranges are stored as rectangles.
|
* when time ranges are stored as rectangles.
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
box_overleft(BOX * box1, BOX * box2)
|
box_overleft(BOX *box1, BOX *box2)
|
||||||
{
|
{
|
||||||
return (FPle(box1->high.x, box2->high.x));
|
return (FPle(box1->high.x, box2->high.x));
|
||||||
}
|
}
|
||||||
@ -487,7 +487,7 @@ box_overleft(BOX * box1, BOX * box2)
|
|||||||
/* box_left - is box1 strictly left of box2?
|
/* box_left - is box1 strictly left of box2?
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
box_left(BOX * box1, BOX * box2)
|
box_left(BOX *box1, BOX *box2)
|
||||||
{
|
{
|
||||||
return (FPlt(box1->high.x, box2->low.x));
|
return (FPlt(box1->high.x, box2->low.x));
|
||||||
}
|
}
|
||||||
@ -495,7 +495,7 @@ box_left(BOX * box1, BOX * box2)
|
|||||||
/* box_right - is box1 strictly right of box2?
|
/* box_right - is box1 strictly right of box2?
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
box_right(BOX * box1, BOX * box2)
|
box_right(BOX *box1, BOX *box2)
|
||||||
{
|
{
|
||||||
return (FPgt(box1->low.x, box2->high.x));
|
return (FPgt(box1->low.x, box2->high.x));
|
||||||
}
|
}
|
||||||
@ -507,7 +507,7 @@ box_right(BOX * box1, BOX * box2)
|
|||||||
* are stored as rectangles.
|
* are stored as rectangles.
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
box_overright(BOX * box1, BOX * box2)
|
box_overright(BOX *box1, BOX *box2)
|
||||||
{
|
{
|
||||||
return (box1->low.x >= box2->low.x);
|
return (box1->low.x >= box2->low.x);
|
||||||
}
|
}
|
||||||
@ -515,7 +515,7 @@ box_overright(BOX * box1, BOX * box2)
|
|||||||
/* box_contained - is box1 contained by box2?
|
/* box_contained - is box1 contained by box2?
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
box_contained(BOX * box1, BOX * box2)
|
box_contained(BOX *box1, BOX *box2)
|
||||||
{
|
{
|
||||||
return ((FPle(box1->high.x, box2->high.x) && FPge(box1->low.x, box2->low.x)) &&
|
return ((FPle(box1->high.x, box2->high.x) && FPge(box1->low.x, box2->low.x)) &&
|
||||||
(FPle(box1->high.y, box2->high.y) && FPge(box1->low.y, box2->low.y)));
|
(FPle(box1->high.y, box2->high.y) && FPge(box1->low.y, box2->low.y)));
|
||||||
@ -524,7 +524,7 @@ box_contained(BOX * box1, BOX * box2)
|
|||||||
/* box_contain - does box1 contain box2?
|
/* box_contain - does box1 contain box2?
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
box_contain(BOX * box1, BOX * box2)
|
box_contain(BOX *box1, BOX *box2)
|
||||||
{
|
{
|
||||||
return ((FPge(box1->high.x, box2->high.x) && FPle(box1->low.x, box2->low.x) &&
|
return ((FPge(box1->high.x, box2->high.x) && FPle(box1->low.x, box2->low.x) &&
|
||||||
FPge(box1->high.y, box2->high.y) && FPle(box1->low.y, box2->low.y)));
|
FPge(box1->high.y, box2->high.y) && FPle(box1->low.y, box2->low.y)));
|
||||||
@ -535,13 +535,13 @@ box_contain(BOX * box1, BOX * box2)
|
|||||||
* is box1 entirely {above,below} box2?
|
* is box1 entirely {above,below} box2?
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
box_below(BOX * box1, BOX * box2)
|
box_below(BOX *box1, BOX *box2)
|
||||||
{
|
{
|
||||||
return (FPle(box1->high.y, box2->low.y));
|
return (FPle(box1->high.y, box2->low.y));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
box_above(BOX * box1, BOX * box2)
|
box_above(BOX *box1, BOX *box2)
|
||||||
{
|
{
|
||||||
return (FPge(box1->low.y, box2->high.y));
|
return (FPge(box1->low.y, box2->high.y));
|
||||||
}
|
}
|
||||||
@ -551,31 +551,31 @@ box_above(BOX * box1, BOX * box2)
|
|||||||
* our accuracy constraint?
|
* our accuracy constraint?
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
box_lt(BOX * box1, BOX * box2)
|
box_lt(BOX *box1, BOX *box2)
|
||||||
{
|
{
|
||||||
return (FPlt(box_ar(box1), box_ar(box2)));
|
return (FPlt(box_ar(box1), box_ar(box2)));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
box_gt(BOX * box1, BOX * box2)
|
box_gt(BOX *box1, BOX *box2)
|
||||||
{
|
{
|
||||||
return (FPgt(box_ar(box1), box_ar(box2)));
|
return (FPgt(box_ar(box1), box_ar(box2)));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
box_eq(BOX * box1, BOX * box2)
|
box_eq(BOX *box1, BOX *box2)
|
||||||
{
|
{
|
||||||
return (FPeq(box_ar(box1), box_ar(box2)));
|
return (FPeq(box_ar(box1), box_ar(box2)));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
box_le(BOX * box1, BOX * box2)
|
box_le(BOX *box1, BOX *box2)
|
||||||
{
|
{
|
||||||
return (FPle(box_ar(box1), box_ar(box2)));
|
return (FPle(box_ar(box1), box_ar(box2)));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
box_ge(BOX * box1, BOX * box2)
|
box_ge(BOX *box1, BOX *box2)
|
||||||
{
|
{
|
||||||
return (FPge(box_ar(box1), box_ar(box2)));
|
return (FPge(box_ar(box1), box_ar(box2)));
|
||||||
}
|
}
|
||||||
@ -593,7 +593,7 @@ box_ge(BOX * box1, BOX * box2)
|
|||||||
/* box_area - returns the area of the box.
|
/* box_area - returns the area of the box.
|
||||||
*/
|
*/
|
||||||
double *
|
double *
|
||||||
box_area(BOX * box)
|
box_area(BOX *box)
|
||||||
{
|
{
|
||||||
double *result = PALLOCTYPE(double);
|
double *result = PALLOCTYPE(double);
|
||||||
|
|
||||||
@ -607,7 +607,7 @@ box_area(BOX * box)
|
|||||||
* (horizontal magnitude).
|
* (horizontal magnitude).
|
||||||
*/
|
*/
|
||||||
double *
|
double *
|
||||||
box_width(BOX * box)
|
box_width(BOX *box)
|
||||||
{
|
{
|
||||||
double *result = PALLOCTYPE(double);
|
double *result = PALLOCTYPE(double);
|
||||||
|
|
||||||
@ -621,7 +621,7 @@ box_width(BOX * box)
|
|||||||
* (vertical magnitude).
|
* (vertical magnitude).
|
||||||
*/
|
*/
|
||||||
double *
|
double *
|
||||||
box_height(BOX * box)
|
box_height(BOX *box)
|
||||||
{
|
{
|
||||||
double *result = PALLOCTYPE(double);
|
double *result = PALLOCTYPE(double);
|
||||||
|
|
||||||
@ -635,7 +635,7 @@ box_height(BOX * box)
|
|||||||
* center points of two boxes.
|
* center points of two boxes.
|
||||||
*/
|
*/
|
||||||
double *
|
double *
|
||||||
box_distance(BOX * box1, BOX * box2)
|
box_distance(BOX *box1, BOX *box2)
|
||||||
{
|
{
|
||||||
double *result = PALLOCTYPE(double);
|
double *result = PALLOCTYPE(double);
|
||||||
Point *a,
|
Point *a,
|
||||||
@ -654,7 +654,7 @@ box_distance(BOX * box1, BOX * box2)
|
|||||||
/* box_center - returns the center point of the box.
|
/* box_center - returns the center point of the box.
|
||||||
*/
|
*/
|
||||||
Point *
|
Point *
|
||||||
box_center(BOX * box)
|
box_center(BOX *box)
|
||||||
{
|
{
|
||||||
Point *result = PALLOCTYPE(Point);
|
Point *result = PALLOCTYPE(Point);
|
||||||
|
|
||||||
@ -668,7 +668,7 @@ box_center(BOX * box)
|
|||||||
/* box_ar - returns the area of the box.
|
/* box_ar - returns the area of the box.
|
||||||
*/
|
*/
|
||||||
static double
|
static double
|
||||||
box_ar(BOX * box)
|
box_ar(BOX *box)
|
||||||
{
|
{
|
||||||
return (box_wd(box) * box_ht(box));
|
return (box_wd(box) * box_ht(box));
|
||||||
}
|
}
|
||||||
@ -678,7 +678,7 @@ box_ar(BOX * box)
|
|||||||
* (horizontal magnitude).
|
* (horizontal magnitude).
|
||||||
*/
|
*/
|
||||||
static double
|
static double
|
||||||
box_wd(BOX * box)
|
box_wd(BOX *box)
|
||||||
{
|
{
|
||||||
return (box->high.x - box->low.x);
|
return (box->high.x - box->low.x);
|
||||||
}
|
}
|
||||||
@ -688,7 +688,7 @@ box_wd(BOX * box)
|
|||||||
* (vertical magnitude).
|
* (vertical magnitude).
|
||||||
*/
|
*/
|
||||||
static double
|
static double
|
||||||
box_ht(BOX * box)
|
box_ht(BOX *box)
|
||||||
{
|
{
|
||||||
return (box->high.y - box->low.y);
|
return (box->high.y - box->low.y);
|
||||||
}
|
}
|
||||||
@ -699,7 +699,7 @@ box_ht(BOX * box)
|
|||||||
*/
|
*/
|
||||||
#ifdef NOT_USED
|
#ifdef NOT_USED
|
||||||
static double
|
static double
|
||||||
box_dt(BOX * box1, BOX * box2)
|
box_dt(BOX *box1, BOX *box2)
|
||||||
{
|
{
|
||||||
double result;
|
double result;
|
||||||
Point *a,
|
Point *a,
|
||||||
@ -725,7 +725,7 @@ box_dt(BOX * box1, BOX * box2)
|
|||||||
* or NULL if they do not intersect.
|
* or NULL if they do not intersect.
|
||||||
*/
|
*/
|
||||||
BOX *
|
BOX *
|
||||||
box_intersect(BOX * box1, BOX * box2)
|
box_intersect(BOX *box1, BOX *box2)
|
||||||
{
|
{
|
||||||
BOX *result;
|
BOX *result;
|
||||||
|
|
||||||
@ -749,7 +749,7 @@ box_intersect(BOX * box1, BOX * box2)
|
|||||||
* provided, of course, we have LSEGs.
|
* provided, of course, we have LSEGs.
|
||||||
*/
|
*/
|
||||||
LSEG *
|
LSEG *
|
||||||
box_diagonal(BOX * box)
|
box_diagonal(BOX *box)
|
||||||
{
|
{
|
||||||
Point p1,
|
Point p1,
|
||||||
p2;
|
p2;
|
||||||
@ -1928,7 +1928,7 @@ dist_ppath(Point * pt, PATH * path)
|
|||||||
}
|
}
|
||||||
|
|
||||||
double *
|
double *
|
||||||
dist_pb(Point * pt, BOX * box)
|
dist_pb(Point * pt, BOX *box)
|
||||||
{
|
{
|
||||||
Point *tmp;
|
Point *tmp;
|
||||||
double *result;
|
double *result;
|
||||||
@ -1973,7 +1973,7 @@ dist_sl(LSEG * lseg, LINE * line)
|
|||||||
|
|
||||||
|
|
||||||
double *
|
double *
|
||||||
dist_sb(LSEG * lseg, BOX * box)
|
dist_sb(LSEG * lseg, BOX *box)
|
||||||
{
|
{
|
||||||
Point *tmp;
|
Point *tmp;
|
||||||
double *result;
|
double *result;
|
||||||
@ -1995,7 +1995,7 @@ dist_sb(LSEG * lseg, BOX * box)
|
|||||||
|
|
||||||
|
|
||||||
double *
|
double *
|
||||||
dist_lb(LINE * line, BOX * box)
|
dist_lb(LINE * line, BOX *box)
|
||||||
{
|
{
|
||||||
Point *tmp;
|
Point *tmp;
|
||||||
double *result;
|
double *result;
|
||||||
@ -2227,7 +2227,7 @@ close_ps(Point * pt, LSEG * lseg)
|
|||||||
} /* close_ps() */
|
} /* close_ps() */
|
||||||
|
|
||||||
Point *
|
Point *
|
||||||
close_pb(Point * pt, BOX * box)
|
close_pb(Point * pt, BOX *box)
|
||||||
{
|
{
|
||||||
/* think about this one for a while */
|
/* think about this one for a while */
|
||||||
elog(WARN, "close_pb not implemented", NULL);
|
elog(WARN, "close_pb not implemented", NULL);
|
||||||
@ -2258,7 +2258,7 @@ close_sl(LSEG * lseg, LINE * line)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Point *
|
Point *
|
||||||
close_sb(LSEG * lseg, BOX * box)
|
close_sb(LSEG * lseg, BOX *box)
|
||||||
{
|
{
|
||||||
/* think about this one for a while */
|
/* think about this one for a while */
|
||||||
elog(WARN, "close_sb not implemented", NULL);
|
elog(WARN, "close_sb not implemented", NULL);
|
||||||
@ -2267,7 +2267,7 @@ close_sb(LSEG * lseg, BOX * box)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Point *
|
Point *
|
||||||
close_lb(LINE * line, BOX * box)
|
close_lb(LINE * line, BOX *box)
|
||||||
{
|
{
|
||||||
/* think about this one for a while */
|
/* think about this one for a while */
|
||||||
elog(WARN, "close_lb not implemented", NULL);
|
elog(WARN, "close_lb not implemented", NULL);
|
||||||
@ -2308,7 +2308,7 @@ on_ps(Point * pt, LSEG * lseg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
on_pb(Point * pt, BOX * box)
|
on_pb(Point * pt, BOX *box)
|
||||||
{
|
{
|
||||||
if (!PointerIsValid(pt) || !PointerIsValid(box))
|
if (!PointerIsValid(pt) || !PointerIsValid(box))
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
@ -2433,7 +2433,7 @@ on_sl(LSEG * lseg, LINE * line)
|
|||||||
} /* on_sl() */
|
} /* on_sl() */
|
||||||
|
|
||||||
bool
|
bool
|
||||||
on_sb(LSEG * lseg, BOX * box)
|
on_sb(LSEG * lseg, BOX *box)
|
||||||
{
|
{
|
||||||
if (!PointerIsValid(lseg) || !PointerIsValid(box))
|
if (!PointerIsValid(lseg) || !PointerIsValid(box))
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
@ -2466,7 +2466,7 @@ inter_sl(LSEG * lseg, LINE * line)
|
|||||||
/* XXX segment and box should be able to intersect; tgl - 97/01/09 */
|
/* XXX segment and box should be able to intersect; tgl - 97/01/09 */
|
||||||
|
|
||||||
bool
|
bool
|
||||||
inter_sb(LSEG * lseg, BOX * box)
|
inter_sb(LSEG * lseg, BOX *box)
|
||||||
{
|
{
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
@ -2474,7 +2474,7 @@ inter_sb(LSEG * lseg, BOX * box)
|
|||||||
/* XXX line and box should be able to intersect; tgl - 97/01/09 */
|
/* XXX line and box should be able to intersect; tgl - 97/01/09 */
|
||||||
|
|
||||||
bool
|
bool
|
||||||
inter_lb(LINE * line, BOX * box)
|
inter_lb(LINE * line, BOX *box)
|
||||||
{
|
{
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
@ -2887,7 +2887,7 @@ box(Point * p1, Point * p2)
|
|||||||
} /* box() */
|
} /* box() */
|
||||||
|
|
||||||
BOX *
|
BOX *
|
||||||
box_add(BOX * box, Point * p)
|
box_add(BOX *box, Point * p)
|
||||||
{
|
{
|
||||||
BOX *result;
|
BOX *result;
|
||||||
|
|
||||||
@ -2901,7 +2901,7 @@ box_add(BOX * box, Point * p)
|
|||||||
} /* box_add() */
|
} /* box_add() */
|
||||||
|
|
||||||
BOX *
|
BOX *
|
||||||
box_sub(BOX * box, Point * p)
|
box_sub(BOX *box, Point * p)
|
||||||
{
|
{
|
||||||
BOX *result;
|
BOX *result;
|
||||||
|
|
||||||
@ -2915,7 +2915,7 @@ box_sub(BOX * box, Point * p)
|
|||||||
} /* box_sub() */
|
} /* box_sub() */
|
||||||
|
|
||||||
BOX *
|
BOX *
|
||||||
box_mul(BOX * box, Point * p)
|
box_mul(BOX *box, Point * p)
|
||||||
{
|
{
|
||||||
BOX *result;
|
BOX *result;
|
||||||
Point *high,
|
Point *high,
|
||||||
@ -2935,7 +2935,7 @@ box_mul(BOX * box, Point * p)
|
|||||||
} /* box_mul() */
|
} /* box_mul() */
|
||||||
|
|
||||||
BOX *
|
BOX *
|
||||||
box_div(BOX * box, Point * p)
|
box_div(BOX *box, Point * p)
|
||||||
{
|
{
|
||||||
BOX *result;
|
BOX *result;
|
||||||
Point *high,
|
Point *high,
|
||||||
@ -3273,7 +3273,7 @@ poly_box(POLYGON * poly)
|
|||||||
* Convert a box to a polygon.
|
* Convert a box to a polygon.
|
||||||
*/
|
*/
|
||||||
POLYGON *
|
POLYGON *
|
||||||
box_poly(BOX * box)
|
box_poly(BOX *box)
|
||||||
{
|
{
|
||||||
POLYGON *poly;
|
POLYGON *poly;
|
||||||
int size;
|
int size;
|
||||||
@ -3958,7 +3958,7 @@ circle_box(CIRCLE * circle)
|
|||||||
* Convert a box to a circle.
|
* Convert a box to a circle.
|
||||||
*/
|
*/
|
||||||
CIRCLE *
|
CIRCLE *
|
||||||
box_circle(BOX * box)
|
box_circle(BOX *box)
|
||||||
{
|
{
|
||||||
CIRCLE *circle;
|
CIRCLE *circle;
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.6 1997/09/08 02:30:45 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.7 1997/09/08 20:57:32 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -248,26 +248,31 @@ int4eq(int32 arg1, int32 arg2)
|
|||||||
{
|
{
|
||||||
return (arg1 == arg2);
|
return (arg1 == arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
int4ne(int32 arg1, int32 arg2)
|
int4ne(int32 arg1, int32 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 != arg2);
|
return (arg1 != arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
int4lt(int32 arg1, int32 arg2)
|
int4lt(int32 arg1, int32 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 < arg2);
|
return (arg1 < arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
int4le(int32 arg1, int32 arg2)
|
int4le(int32 arg1, int32 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 <= arg2);
|
return (arg1 <= arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
int4gt(int32 arg1, int32 arg2)
|
int4gt(int32 arg1, int32 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 > arg2);
|
return (arg1 > arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
int4ge(int32 arg1, int32 arg2)
|
int4ge(int32 arg1, int32 arg2)
|
||||||
{
|
{
|
||||||
@ -279,26 +284,31 @@ int2eq(int16 arg1, int16 arg2)
|
|||||||
{
|
{
|
||||||
return (arg1 == arg2);
|
return (arg1 == arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
int2ne(int16 arg1, int16 arg2)
|
int2ne(int16 arg1, int16 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 != arg2);
|
return (arg1 != arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
int2lt(int16 arg1, int16 arg2)
|
int2lt(int16 arg1, int16 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 < arg2);
|
return (arg1 < arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
int2le(int16 arg1, int16 arg2)
|
int2le(int16 arg1, int16 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 <= arg2);
|
return (arg1 <= arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
int2gt(int16 arg1, int16 arg2)
|
int2gt(int16 arg1, int16 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 > arg2);
|
return (arg1 > arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
int2ge(int16 arg1, int16 arg2)
|
int2ge(int16 arg1, int16 arg2)
|
||||||
{
|
{
|
||||||
@ -310,26 +320,31 @@ int24eq(int32 arg1, int32 arg2)
|
|||||||
{
|
{
|
||||||
return (arg1 == arg2);
|
return (arg1 == arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
int24ne(int32 arg1, int32 arg2)
|
int24ne(int32 arg1, int32 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 != arg2);
|
return (arg1 != arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
int24lt(int32 arg1, int32 arg2)
|
int24lt(int32 arg1, int32 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 < arg2);
|
return (arg1 < arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
int24le(int32 arg1, int32 arg2)
|
int24le(int32 arg1, int32 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 <= arg2);
|
return (arg1 <= arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
int24gt(int32 arg1, int32 arg2)
|
int24gt(int32 arg1, int32 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 > arg2);
|
return (arg1 > arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
int24ge(int32 arg1, int32 arg2)
|
int24ge(int32 arg1, int32 arg2)
|
||||||
{
|
{
|
||||||
@ -341,26 +356,31 @@ int42eq(int32 arg1, int32 arg2)
|
|||||||
{
|
{
|
||||||
return (arg1 == arg2);
|
return (arg1 == arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
int42ne(int32 arg1, int32 arg2)
|
int42ne(int32 arg1, int32 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 != arg2);
|
return (arg1 != arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
int42lt(int32 arg1, int32 arg2)
|
int42lt(int32 arg1, int32 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 < arg2);
|
return (arg1 < arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
int42le(int32 arg1, int32 arg2)
|
int42le(int32 arg1, int32 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 <= arg2);
|
return (arg1 <= arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
int42gt(int32 arg1, int32 arg2)
|
int42gt(int32 arg1, int32 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 > arg2);
|
return (arg1 > arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
int42ge(int32 arg1, int32 arg2)
|
int42ge(int32 arg1, int32 arg2)
|
||||||
{
|
{
|
||||||
@ -385,26 +405,31 @@ int4um(int32 arg)
|
|||||||
{
|
{
|
||||||
return (-arg);
|
return (-arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32
|
int32
|
||||||
int4pl(int32 arg1, int32 arg2)
|
int4pl(int32 arg1, int32 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 + arg2);
|
return (arg1 + arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32
|
int32
|
||||||
int4mi(int32 arg1, int32 arg2)
|
int4mi(int32 arg1, int32 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 - arg2);
|
return (arg1 - arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32
|
int32
|
||||||
int4mul(int32 arg1, int32 arg2)
|
int4mul(int32 arg1, int32 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 * arg2);
|
return (arg1 * arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32
|
int32
|
||||||
int4div(int32 arg1, int32 arg2)
|
int4div(int32 arg1, int32 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 / arg2);
|
return (arg1 / arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32
|
int32
|
||||||
int4inc(int32 arg)
|
int4inc(int32 arg)
|
||||||
{
|
{
|
||||||
@ -416,26 +441,31 @@ int2um(int16 arg)
|
|||||||
{
|
{
|
||||||
return (-arg);
|
return (-arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
int16
|
int16
|
||||||
int2pl(int16 arg1, int16 arg2)
|
int2pl(int16 arg1, int16 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 + arg2);
|
return (arg1 + arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
int16
|
int16
|
||||||
int2mi(int16 arg1, int16 arg2)
|
int2mi(int16 arg1, int16 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 - arg2);
|
return (arg1 - arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
int16
|
int16
|
||||||
int2mul(int16 arg1, int16 arg2)
|
int2mul(int16 arg1, int16 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 * arg2);
|
return (arg1 * arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
int16
|
int16
|
||||||
int2div(int16 arg1, int16 arg2)
|
int2div(int16 arg1, int16 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 / arg2);
|
return (arg1 / arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
int16
|
int16
|
||||||
int2inc(int16 arg)
|
int2inc(int16 arg)
|
||||||
{
|
{
|
||||||
@ -447,16 +477,19 @@ int24pl(int32 arg1, int32 arg2)
|
|||||||
{
|
{
|
||||||
return (arg1 + arg2);
|
return (arg1 + arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32
|
int32
|
||||||
int24mi(int32 arg1, int32 arg2)
|
int24mi(int32 arg1, int32 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 - arg2);
|
return (arg1 - arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32
|
int32
|
||||||
int24mul(int32 arg1, int32 arg2)
|
int24mul(int32 arg1, int32 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 * arg2);
|
return (arg1 * arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32
|
int32
|
||||||
int24div(int32 arg1, int32 arg2)
|
int24div(int32 arg1, int32 arg2)
|
||||||
{
|
{
|
||||||
@ -468,16 +501,19 @@ int42pl(int32 arg1, int32 arg2)
|
|||||||
{
|
{
|
||||||
return (arg1 + arg2);
|
return (arg1 + arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32
|
int32
|
||||||
int42mi(int32 arg1, int32 arg2)
|
int42mi(int32 arg1, int32 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 - arg2);
|
return (arg1 - arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32
|
int32
|
||||||
int42mul(int32 arg1, int32 arg2)
|
int42mul(int32 arg1, int32 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 * arg2);
|
return (arg1 * arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32
|
int32
|
||||||
int42div(int32 arg1, int32 arg2)
|
int42div(int32 arg1, int32 arg2)
|
||||||
{
|
{
|
||||||
@ -492,16 +528,19 @@ int4mod(int32 arg1, int32 arg2)
|
|||||||
{
|
{
|
||||||
return (arg1 % arg2);
|
return (arg1 % arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32
|
int32
|
||||||
int2mod(int16 arg1, int16 arg2)
|
int2mod(int16 arg1, int16 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 % arg2);
|
return (arg1 % arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32
|
int32
|
||||||
int24mod(int32 arg1, int32 arg2)
|
int24mod(int32 arg1, int32 arg2)
|
||||||
{
|
{
|
||||||
return (arg1 % arg2);
|
return (arg1 % arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32
|
int32
|
||||||
int42mod(int32 arg1, int32 arg2)
|
int42mod(int32 arg1, int32 arg2)
|
||||||
{
|
{
|
||||||
|
4
src/backend/utils/cache/inval.c
vendored
4
src/backend/utils/cache/inval.c
vendored
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.6 1997/09/08 02:31:12 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.7 1997/09/08 20:57:39 momjian Exp $
|
||||||
*
|
*
|
||||||
* Note - this code is real crufty...
|
* Note - this code is real crufty...
|
||||||
*
|
*
|
||||||
@ -60,7 +60,7 @@ typedef union AnyInvalidation
|
|||||||
{
|
{
|
||||||
CatalogInvalidationData catalog;
|
CatalogInvalidationData catalog;
|
||||||
RelationInvalidationData relation;
|
RelationInvalidationData relation;
|
||||||
} AnyInvalidation;
|
} AnyInvalidation;
|
||||||
|
|
||||||
typedef struct InvalidationMessageData
|
typedef struct InvalidationMessageData
|
||||||
{
|
{
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/aset.c,v 1.7 1997/09/08 02:32:05 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/aset.c,v 1.8 1997/09/08 20:57:46 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTE
|
* NOTE
|
||||||
* XXX This is a preliminary implementation which lacks fail-fast
|
* XXX This is a preliminary implementation which lacks fail-fast
|
||||||
@ -46,7 +46,7 @@ typedef struct AllocElemData
|
|||||||
{
|
{
|
||||||
OrderedElemData elemData; /* elem in AllocSet */
|
OrderedElemData elemData; /* elem in AllocSet */
|
||||||
Size size;
|
Size size;
|
||||||
} AllocElemData;
|
} AllocElemData;
|
||||||
|
|
||||||
typedef AllocElemData *AllocElem;
|
typedef AllocElemData *AllocElem;
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.42 1997/09/08 02:32:45 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.43 1997/09/08 20:57:50 momjian Exp $
|
||||||
*
|
*
|
||||||
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
|
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
|
||||||
*
|
*
|
||||||
@ -1027,7 +1027,7 @@ clearIndInfo(IndInfo * ind, int numIndices)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
clearAggInfo(AggInfo * agginfo, int numArgs)
|
clearAggInfo(AggInfo *agginfo, int numArgs)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -1837,7 +1837,7 @@ dumpOprs(FILE * fout, OprInfo * oprinfo, int numOperators,
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
dumpAggs(FILE * fout, AggInfo * agginfo, int numAggs,
|
dumpAggs(FILE * fout, AggInfo *agginfo, int numAggs,
|
||||||
TypeInfo * tinfo, int numTypes)
|
TypeInfo * tinfo, int numTypes)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: pg_dump.h,v 1.21 1997/09/08 02:32:50 momjian Exp $
|
* $Id: pg_dump.h,v 1.22 1997/09/08 20:57:56 momjian Exp $
|
||||||
*
|
*
|
||||||
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
|
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
|
||||||
*
|
*
|
||||||
@ -124,7 +124,7 @@ typedef struct _aggInfo
|
|||||||
char *agginitval1;
|
char *agginitval1;
|
||||||
char *agginitval2;
|
char *agginitval2;
|
||||||
char *usename;
|
char *usename;
|
||||||
} AggInfo;
|
} AggInfo;
|
||||||
|
|
||||||
typedef struct _oprInfo
|
typedef struct _oprInfo
|
||||||
{
|
{
|
||||||
@ -216,7 +216,7 @@ extern void
|
|||||||
dumpFuncs(FILE * fout, FuncInfo * finfo, int numFuncs,
|
dumpFuncs(FILE * fout, FuncInfo * finfo, int numFuncs,
|
||||||
TypeInfo * tinfo, int numTypes);
|
TypeInfo * tinfo, int numTypes);
|
||||||
extern void
|
extern void
|
||||||
dumpAggs(FILE * fout, AggInfo * agginfo, int numAggregates,
|
dumpAggs(FILE * fout, AggInfo *agginfo, int numAggregates,
|
||||||
TypeInfo * tinfo, int numTypes);
|
TypeInfo * tinfo, int numTypes);
|
||||||
extern void
|
extern void
|
||||||
dumpOprs(FILE * fout, OprInfo * agginfo, int numOperators,
|
dumpOprs(FILE * fout, OprInfo * agginfo, int numOperators,
|
||||||
|
@ -189,7 +189,7 @@ typedef struct intrange
|
|||||||
extern void
|
extern void
|
||||||
gistbuild(Relation heap,
|
gistbuild(Relation heap,
|
||||||
Relation index, int natts,
|
Relation index, int natts,
|
||||||
AttrNumber * attnum, IndexStrategy istrat,
|
AttrNumber *attnum, IndexStrategy istrat,
|
||||||
uint16 pint, Datum * params,
|
uint16 pint, Datum * params,
|
||||||
FuncIndexInfo * finfo,
|
FuncIndexInfo * finfo,
|
||||||
PredInfo * predInfo);
|
PredInfo * predInfo);
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: hash.h,v 1.9 1997/09/08 02:34:08 momjian Exp $
|
* $Id: hash.h,v 1.10 1997/09/08 20:58:02 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* modeled after Margo Seltzer's hash implementation for unix.
|
* modeled after Margo Seltzer's hash implementation for unix.
|
||||||
@ -250,7 +250,7 @@ typedef HashItemData *HashItem;
|
|||||||
|
|
||||||
extern void
|
extern void
|
||||||
hashbuild(Relation heap, Relation index, int natts,
|
hashbuild(Relation heap, Relation index, int natts,
|
||||||
AttrNumber * attnum, IndexStrategy istrat, uint16 pcount,
|
AttrNumber *attnum, IndexStrategy istrat, uint16 pcount,
|
||||||
Datum * params, FuncIndexInfo * finfo, PredInfo * predInfo);
|
Datum * params, FuncIndexInfo * finfo, PredInfo * predInfo);
|
||||||
extern InsertIndexResult
|
extern InsertIndexResult
|
||||||
hashinsert(Relation rel, Datum * datum, char *nulls,
|
hashinsert(Relation rel, Datum * datum, char *nulls,
|
||||||
@ -286,7 +286,7 @@ extern InsertIndexResult _hash_doinsert(Relation rel, HashItem hitem);
|
|||||||
|
|
||||||
|
|
||||||
/* hashovfl.c */
|
/* hashovfl.c */
|
||||||
extern Buffer _hash_addovflpage(Relation rel, Buffer * metabufp, Buffer buf);
|
extern Buffer _hash_addovflpage(Relation rel, Buffer *metabufp, Buffer buf);
|
||||||
extern Buffer _hash_freeovflpage(Relation rel, Buffer ovflbuf);
|
extern Buffer _hash_freeovflpage(Relation rel, Buffer ovflbuf);
|
||||||
extern int32
|
extern int32
|
||||||
_hash_initbitmap(Relation rel, HashMetaPage metap, int32 pnum,
|
_hash_initbitmap(Relation rel, HashMetaPage metap, int32 pnum,
|
||||||
@ -303,7 +303,7 @@ extern void _hash_relbuf(Relation rel, Buffer buf, int access);
|
|||||||
extern void _hash_wrtbuf(Relation rel, Buffer buf);
|
extern void _hash_wrtbuf(Relation rel, Buffer buf);
|
||||||
extern void _hash_wrtnorelbuf(Relation rel, Buffer buf);
|
extern void _hash_wrtnorelbuf(Relation rel, Buffer buf);
|
||||||
extern Page
|
extern Page
|
||||||
_hash_chgbufaccess(Relation rel, Buffer * bufp, int from_access,
|
_hash_chgbufaccess(Relation rel, Buffer *bufp, int from_access,
|
||||||
int to_access);
|
int to_access);
|
||||||
extern void _hash_pageinit(Page page, Size size);
|
extern void _hash_pageinit(Page page, Size size);
|
||||||
extern void _hash_pagedel(Relation rel, ItemPointer tid);
|
extern void _hash_pagedel(Relation rel, ItemPointer tid);
|
||||||
@ -319,11 +319,11 @@ extern void _hash_adjscans(Relation rel, ItemPointer tid);
|
|||||||
/* hashsearch.c */
|
/* hashsearch.c */
|
||||||
extern void
|
extern void
|
||||||
_hash_search(Relation rel, int keysz, ScanKey scankey,
|
_hash_search(Relation rel, int keysz, ScanKey scankey,
|
||||||
Buffer * bufP, HashMetaPage metap);
|
Buffer *bufP, HashMetaPage metap);
|
||||||
extern RetrieveIndexResult _hash_next(IndexScanDesc scan, ScanDirection dir);
|
extern RetrieveIndexResult _hash_next(IndexScanDesc scan, ScanDirection dir);
|
||||||
extern RetrieveIndexResult _hash_first(IndexScanDesc scan, ScanDirection dir);
|
extern RetrieveIndexResult _hash_first(IndexScanDesc scan, ScanDirection dir);
|
||||||
extern bool
|
extern bool
|
||||||
_hash_step(IndexScanDesc scan, Buffer * bufP, ScanDirection dir,
|
_hash_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir,
|
||||||
Buffer metabuf);
|
Buffer metabuf);
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: heapam.h,v 1.13 1997/09/08 02:34:10 momjian Exp $
|
* $Id: heapam.h,v 1.14 1997/09/08 20:58:03 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -122,10 +122,10 @@ heap_beginscan(Relation relation, int atend,
|
|||||||
TimeQual timeQual, unsigned nkeys, ScanKey key);
|
TimeQual timeQual, unsigned nkeys, ScanKey key);
|
||||||
extern void heap_rescan(HeapScanDesc sdesc, bool scanFromEnd, ScanKey key);
|
extern void heap_rescan(HeapScanDesc sdesc, bool scanFromEnd, ScanKey key);
|
||||||
extern void heap_endscan(HeapScanDesc sdesc);
|
extern void heap_endscan(HeapScanDesc sdesc);
|
||||||
extern HeapTuple heap_getnext(HeapScanDesc scandesc, int backw, Buffer * b);
|
extern HeapTuple heap_getnext(HeapScanDesc scandesc, int backw, Buffer *b);
|
||||||
extern HeapTuple
|
extern HeapTuple
|
||||||
heap_fetch(Relation relation, TimeQual timeQual,
|
heap_fetch(Relation relation, TimeQual timeQual,
|
||||||
ItemPointer tid, Buffer * b);
|
ItemPointer tid, Buffer *b);
|
||||||
extern Oid heap_insert(Relation relation, HeapTuple tup);
|
extern Oid heap_insert(Relation relation, HeapTuple tup);
|
||||||
extern int heap_delete(Relation relation, ItemPointer tid);
|
extern int heap_delete(Relation relation, ItemPointer tid);
|
||||||
extern int
|
extern int
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: nbtree.h,v 1.16 1997/09/08 02:34:17 momjian Exp $
|
* $Id: nbtree.h,v 1.17 1997/09/08 20:58:09 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -50,7 +50,7 @@ typedef struct BTPageOpaqueData
|
|||||||
#define BTP_META (1 << 3)
|
#define BTP_META (1 << 3)
|
||||||
#define BTP_CHAIN (1 << 4)
|
#define BTP_CHAIN (1 << 4)
|
||||||
|
|
||||||
} BTPageOpaqueData;
|
} BTPageOpaqueData;
|
||||||
|
|
||||||
typedef BTPageOpaqueData *BTPageOpaque;
|
typedef BTPageOpaqueData *BTPageOpaque;
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ typedef struct BTScanOpaqueData
|
|||||||
uint16 numberOfFirstKeys; /* number of keys for 1st
|
uint16 numberOfFirstKeys; /* number of keys for 1st
|
||||||
* attribute */
|
* attribute */
|
||||||
ScanKey keyData; /* key descriptor */
|
ScanKey keyData; /* key descriptor */
|
||||||
} BTScanOpaqueData;
|
} BTScanOpaqueData;
|
||||||
|
|
||||||
typedef BTScanOpaqueData *BTScanOpaque;
|
typedef BTScanOpaqueData *BTScanOpaque;
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ typedef struct BTItemData
|
|||||||
* 8-byte boundary */
|
* 8-byte boundary */
|
||||||
#endif
|
#endif
|
||||||
IndexTupleData bti_itup;
|
IndexTupleData bti_itup;
|
||||||
} BTItemData;
|
} BTItemData;
|
||||||
|
|
||||||
typedef BTItemData *BTItem;
|
typedef BTItemData *BTItem;
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ typedef struct BTStackData
|
|||||||
OffsetNumber bts_offset;
|
OffsetNumber bts_offset;
|
||||||
BTItem bts_btitem;
|
BTItem bts_btitem;
|
||||||
struct BTStackData *bts_parent;
|
struct BTStackData *bts_parent;
|
||||||
} BTStackData;
|
} BTStackData;
|
||||||
|
|
||||||
typedef BTStackData *BTStack;
|
typedef BTStackData *BTStack;
|
||||||
|
|
||||||
@ -149,7 +149,7 @@ typedef struct BTPageState
|
|||||||
int btps_level;
|
int btps_level;
|
||||||
bool btps_doupper;
|
bool btps_doupper;
|
||||||
struct BTPageState *btps_next;
|
struct BTPageState *btps_next;
|
||||||
} BTPageState;
|
} BTPageState;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We need to be able to tell the difference between read and write
|
* We need to be able to tell the difference between read and write
|
||||||
@ -243,7 +243,7 @@ extern bool BuildingBtree; /* in nbtree.c */
|
|||||||
|
|
||||||
extern void
|
extern void
|
||||||
btbuild(Relation heap, Relation index, int natts,
|
btbuild(Relation heap, Relation index, int natts,
|
||||||
AttrNumber * attnum, IndexStrategy istrat, uint16 pcount,
|
AttrNumber *attnum, IndexStrategy istrat, uint16 pcount,
|
||||||
Datum * params, FuncIndexInfo * finfo, PredInfo * predInfo);
|
Datum * params, FuncIndexInfo * finfo, PredInfo * predInfo);
|
||||||
extern InsertIndexResult
|
extern InsertIndexResult
|
||||||
btinsert(Relation rel, Datum * datum, char *nulls,
|
btinsert(Relation rel, Datum * datum, char *nulls,
|
||||||
@ -270,10 +270,10 @@ extern void _bt_adjscans(Relation rel, ItemPointer tid, int op);
|
|||||||
/*
|
/*
|
||||||
* prototypes for functions in nbtsearch.c
|
* prototypes for functions in nbtsearch.c
|
||||||
*/
|
*/
|
||||||
extern BTStack
|
extern BTStack
|
||||||
_bt_search(Relation rel, int keysz, ScanKey scankey,
|
_bt_search(Relation rel, int keysz, ScanKey scankey,
|
||||||
Buffer * bufP);
|
Buffer *bufP);
|
||||||
extern Buffer
|
extern Buffer
|
||||||
_bt_moveright(Relation rel, Buffer buf, int keysz,
|
_bt_moveright(Relation rel, Buffer buf, int keysz,
|
||||||
ScanKey scankey, int access);
|
ScanKey scankey, int access);
|
||||||
extern bool
|
extern bool
|
||||||
@ -284,7 +284,7 @@ _bt_binsrch(Relation rel, Buffer buf, int keysz,
|
|||||||
ScanKey scankey, int srchtype);
|
ScanKey scankey, int srchtype);
|
||||||
extern RetrieveIndexResult _bt_next(IndexScanDesc scan, ScanDirection dir);
|
extern RetrieveIndexResult _bt_next(IndexScanDesc scan, ScanDirection dir);
|
||||||
extern RetrieveIndexResult _bt_first(IndexScanDesc scan, ScanDirection dir);
|
extern RetrieveIndexResult _bt_first(IndexScanDesc scan, ScanDirection dir);
|
||||||
extern bool _bt_step(IndexScanDesc scan, Buffer * bufP, ScanDirection dir);
|
extern bool _bt_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* prototypes for functions in nbtstrat.c
|
* prototypes for functions in nbtstrat.c
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: rtree.h,v 1.8 1997/09/08 02:34:23 momjian Exp $
|
* $Id: rtree.h,v 1.9 1997/09/08 20:58:11 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -130,7 +130,7 @@ extern void rtrestrpos(IndexScanDesc s);
|
|||||||
extern void rtrescan(IndexScanDesc s, bool fromEnd, ScanKey key);
|
extern void rtrescan(IndexScanDesc s, bool fromEnd, ScanKey key);
|
||||||
extern void
|
extern void
|
||||||
rtbuild(Relation heap, Relation index, int natts,
|
rtbuild(Relation heap, Relation index, int natts,
|
||||||
AttrNumber * attnum, IndexStrategy istrat, uint16 pcount,
|
AttrNumber *attnum, IndexStrategy istrat, uint16 pcount,
|
||||||
Datum * params, FuncIndexInfo * finfo, PredInfo * predInfo);
|
Datum * params, FuncIndexInfo * finfo, PredInfo * predInfo);
|
||||||
extern void _rtdump(Relation r);
|
extern void _rtdump(Relation r);
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: strat.h,v 1.6 1997/09/08 02:34:27 momjian Exp $
|
* $Id: strat.h,v 1.7 1997/09/08 20:58:12 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -25,6 +25,7 @@ typedef struct StrategyTransformMapData
|
|||||||
StrategyNumber strategy[1]; /* VARIABLE LENGTH ARRAY */
|
StrategyNumber strategy[1]; /* VARIABLE LENGTH ARRAY */
|
||||||
} StrategyTransformMapData; /* VARIABLE LENGTH
|
} StrategyTransformMapData; /* VARIABLE LENGTH
|
||||||
|
|
||||||
|
*
|
||||||
*
|
*
|
||||||
* STRUCTURE */
|
* STRUCTURE */
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: transam.h,v 1.9 1997/09/08 02:34:27 momjian Exp $
|
* $Id: transam.h,v 1.10 1997/09/08 20:58:12 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* Transaction System Version 101 now support proper oid
|
* Transaction System Version 101 now support proper oid
|
||||||
@ -154,7 +154,7 @@ extern void TransactionIdAbort(TransactionId transactionId);
|
|||||||
extern void AmiTransactionOverride(bool flag);
|
extern void AmiTransactionOverride(bool flag);
|
||||||
extern void
|
extern void
|
||||||
TransComputeBlockNumber(Relation relation,
|
TransComputeBlockNumber(Relation relation,
|
||||||
TransactionId transactionId, BlockNumber * blockNumberOutP);
|
TransactionId transactionId, BlockNumber *blockNumberOutP);
|
||||||
extern XidStatus
|
extern XidStatus
|
||||||
TransBlockNumberGetXidStatus(Relation relation,
|
TransBlockNumberGetXidStatus(Relation relation,
|
||||||
BlockNumber blockNumber, TransactionId xid, bool * failP);
|
BlockNumber blockNumber, TransactionId xid, bool * failP);
|
||||||
@ -162,7 +162,7 @@ extern void
|
|||||||
TransBlockNumberSetXidStatus(Relation relation,
|
TransBlockNumberSetXidStatus(Relation relation,
|
||||||
BlockNumber blockNumber, TransactionId xid, XidStatus xstatus,
|
BlockNumber blockNumber, TransactionId xid, XidStatus xstatus,
|
||||||
bool * failP);
|
bool * failP);
|
||||||
extern AbsoluteTime
|
extern AbsoluteTime
|
||||||
TransBlockNumberGetCommitTime(Relation relation,
|
TransBlockNumberGetCommitTime(Relation relation,
|
||||||
BlockNumber blockNumber, TransactionId xid, bool * failP);
|
BlockNumber blockNumber, TransactionId xid, bool * failP);
|
||||||
extern void
|
extern void
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: tupdesc.h,v 1.10 1997/09/08 02:34:31 momjian Exp $
|
* $Id: tupdesc.h,v 1.11 1997/09/08 20:58:13 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -23,7 +23,7 @@ typedef struct attrDefault
|
|||||||
AttrNumber adnum;
|
AttrNumber adnum;
|
||||||
char *adbin;
|
char *adbin;
|
||||||
char *adsrc;
|
char *adsrc;
|
||||||
} AttrDefault;
|
} AttrDefault;
|
||||||
|
|
||||||
typedef struct constrCheck
|
typedef struct constrCheck
|
||||||
{
|
{
|
||||||
@ -57,7 +57,7 @@ typedef struct tupleDesc
|
|||||||
|
|
||||||
extern TupleDesc CreateTemplateTupleDesc(int natts);
|
extern TupleDesc CreateTemplateTupleDesc(int natts);
|
||||||
|
|
||||||
extern TupleDesc CreateTupleDesc(int natts, AttributeTupleForm * attrs);
|
extern TupleDesc CreateTupleDesc(int natts, AttributeTupleForm *attrs);
|
||||||
|
|
||||||
extern TupleDesc CreateTupleDescCopy(TupleDesc tupdesc);
|
extern TupleDesc CreateTupleDescCopy(TupleDesc tupdesc);
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: bootstrap.h,v 1.7 1997/09/08 02:34:36 momjian Exp $
|
* $Id: bootstrap.h,v 1.8 1997/09/08 20:58:15 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -37,7 +37,7 @@ extern void
|
|||||||
index_register(char *heap,
|
index_register(char *heap,
|
||||||
char *ind,
|
char *ind,
|
||||||
int natts,
|
int natts,
|
||||||
AttrNumber * attnos,
|
AttrNumber *attnos,
|
||||||
uint16 nparams,
|
uint16 nparams,
|
||||||
Datum * params,
|
Datum * params,
|
||||||
FuncIndexInfo * finfo,
|
FuncIndexInfo * finfo,
|
||||||
|
@ -6,16 +6,16 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: nodeAgg.h,v 1.3 1997/09/08 02:36:21 momjian Exp $
|
* $Id: nodeAgg.h,v 1.4 1997/09/08 20:58:17 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
#ifndef NODEAGG_H
|
#ifndef NODEAGG_H
|
||||||
#define NODEAGG_H
|
#define NODEAGG_H
|
||||||
|
|
||||||
extern TupleTableSlot *ExecAgg(Agg * node);
|
extern TupleTableSlot *ExecAgg(Agg *node);
|
||||||
extern bool ExecInitAgg(Agg * node, EState * estate, Plan * parent);
|
extern bool ExecInitAgg(Agg *node, EState * estate, Plan * parent);
|
||||||
extern int ExecCountSlotsAgg(Agg * node);
|
extern int ExecCountSlotsAgg(Agg *node);
|
||||||
extern void ExecEndAgg(Agg * node);
|
extern void ExecEndAgg(Agg *node);
|
||||||
|
|
||||||
#endif /* NODEAGG_H */
|
#endif /* NODEAGG_H */
|
||||||
|
@ -6,16 +6,16 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: nodeAppend.h,v 1.4 1997/09/08 02:36:22 momjian Exp $
|
* $Id: nodeAppend.h,v 1.5 1997/09/08 20:58:19 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
#ifndef NODEAPPEND_H
|
#ifndef NODEAPPEND_H
|
||||||
#define NODEAPPEND_H
|
#define NODEAPPEND_H
|
||||||
|
|
||||||
extern bool ExecInitAppend(Append * node, EState * estate, Plan * parent);
|
extern bool ExecInitAppend(Append *node, EState * estate, Plan * parent);
|
||||||
extern int ExecCountSlotsAppend(Append * node);
|
extern int ExecCountSlotsAppend(Append *node);
|
||||||
extern TupleTableSlot *ExecProcAppend(Append * node);
|
extern TupleTableSlot *ExecProcAppend(Append *node);
|
||||||
extern void ExecEndAppend(Append * node);
|
extern void ExecEndAppend(Append *node);
|
||||||
|
|
||||||
#endif /* NODEAPPEND_H */
|
#endif /* NODEAPPEND_H */
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: pqcomm.h,v 1.12 1997/09/08 02:37:08 momjian Exp $
|
* $Id: pqcomm.h,v 1.13 1997/09/08 20:58:26 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* Some of this should move to libpq.h
|
* Some of this should move to libpq.h
|
||||||
@ -111,7 +111,7 @@ typedef struct Port
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* PacketBufId id;
|
* PacketBufId id;
|
||||||
*//* id of packet buf currently in use */
|
*//* id of packet buf currently in use */
|
||||||
PacketBuf buf; /* stream implementation (curr pack buf) */
|
PacketBuf buf; /* stream implementation (curr pack buf) */
|
||||||
} Port;
|
} Port;
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: execnodes.h,v 1.10 1997/09/08 02:37:12 momjian Exp $
|
* $Id: execnodes.h,v 1.11 1997/09/08 20:58:40 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -328,7 +328,7 @@ typedef struct AppendState
|
|||||||
List *as_rtentries;
|
List *as_rtentries;
|
||||||
List *as_result_relation_info_list;
|
List *as_result_relation_info_list;
|
||||||
List *as_junkFilter_list;
|
List *as_junkFilter_list;
|
||||||
} AppendState;
|
} AppendState;
|
||||||
|
|
||||||
/* ----------------------------------------------------------------
|
/* ----------------------------------------------------------------
|
||||||
* Scan State Information
|
* Scan State Information
|
||||||
@ -574,7 +574,7 @@ typedef struct AggState
|
|||||||
{
|
{
|
||||||
CommonScanState csstate; /* its first field is NodeTag */
|
CommonScanState csstate; /* its first field is NodeTag */
|
||||||
bool agg_done;
|
bool agg_done;
|
||||||
} AggState;
|
} AggState;
|
||||||
|
|
||||||
/* ---------------------
|
/* ---------------------
|
||||||
* GroupState information
|
* GroupState information
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: parsenodes.h,v 1.25 1997/09/08 02:37:23 momjian Exp $
|
* $Id: parsenodes.h,v 1.26 1997/09/08 20:58:47 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -86,7 +86,7 @@ typedef struct AddAttrStmt
|
|||||||
char *relname; /* the relation to add attr */
|
char *relname; /* the relation to add attr */
|
||||||
bool inh; /* add recursively to children? */
|
bool inh; /* add recursively to children? */
|
||||||
struct ColumnDef *colDef; /* the attribute definition */
|
struct ColumnDef *colDef; /* the attribute definition */
|
||||||
} AddAttrStmt;
|
} AddAttrStmt;
|
||||||
|
|
||||||
/* ----------------------
|
/* ----------------------
|
||||||
* Change ACL Statement
|
* Change ACL Statement
|
||||||
@ -132,7 +132,7 @@ typedef struct CopyStmt
|
|||||||
typedef enum ArchType
|
typedef enum ArchType
|
||||||
{
|
{
|
||||||
ARCH_NONE, ARCH_LIGHT, ARCH_HEAVY /* archive mode */
|
ARCH_NONE, ARCH_LIGHT, ARCH_HEAVY /* archive mode */
|
||||||
} ArchType;
|
} ArchType;
|
||||||
|
|
||||||
typedef struct CreateStmt
|
typedef struct CreateStmt
|
||||||
{
|
{
|
||||||
@ -562,7 +562,7 @@ typedef struct AppendStmt
|
|||||||
List *targetList; /* the target list (of ResTarget) */
|
List *targetList; /* the target list (of ResTarget) */
|
||||||
List *fromClause; /* the from clause */
|
List *fromClause; /* the from clause */
|
||||||
Node *whereClause; /* qualifications */
|
Node *whereClause; /* qualifications */
|
||||||
} AppendStmt;
|
} AppendStmt;
|
||||||
|
|
||||||
/* ----------------------
|
/* ----------------------
|
||||||
* Delete Statement
|
* Delete Statement
|
||||||
@ -676,7 +676,7 @@ typedef struct A_Expr
|
|||||||
char *opname; /* name of operator/function */
|
char *opname; /* name of operator/function */
|
||||||
Node *lexpr; /* left argument */
|
Node *lexpr; /* left argument */
|
||||||
Node *rexpr; /* right argument */
|
Node *rexpr; /* right argument */
|
||||||
} A_Expr;
|
} A_Expr;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Attr -
|
* Attr -
|
||||||
@ -692,7 +692,7 @@ typedef struct Attr
|
|||||||
List *attrs; /* attributes (possibly nested); list of
|
List *attrs; /* attributes (possibly nested); list of
|
||||||
* Values (strings) */
|
* Values (strings) */
|
||||||
List *indirection; /* array refs (list of A_Indices') */
|
List *indirection; /* array refs (list of A_Indices') */
|
||||||
} Attr;
|
} Attr;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A_Const - a constant expression
|
* A_Const - a constant expression
|
||||||
@ -702,7 +702,7 @@ typedef struct A_Const
|
|||||||
NodeTag type;
|
NodeTag type;
|
||||||
Value val; /* the value (with the tag) */
|
Value val; /* the value (with the tag) */
|
||||||
TypeName *typename; /* typecast */
|
TypeName *typename; /* typecast */
|
||||||
} A_Const;
|
} A_Const;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ColumnDef - column definition (used in various creates)
|
* ColumnDef - column definition (used in various creates)
|
||||||
@ -750,7 +750,7 @@ typedef struct A_Indices
|
|||||||
NodeTag type;
|
NodeTag type;
|
||||||
Node *lidx; /* could be NULL */
|
Node *lidx; /* could be NULL */
|
||||||
Node *uidx;
|
Node *uidx;
|
||||||
} A_Indices;
|
} A_Indices;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ResTarget -
|
* ResTarget -
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: plannodes.h,v 1.8 1997/09/08 02:37:26 momjian Exp $
|
* $Id: plannodes.h,v 1.9 1997/09/08 20:58:48 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -129,7 +129,7 @@ typedef struct Append
|
|||||||
Index unionrelid;
|
Index unionrelid;
|
||||||
List *unionrtentries;
|
List *unionrtentries;
|
||||||
AppendState *unionstate;
|
AppendState *unionstate;
|
||||||
} Append;
|
} Append;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ==========
|
* ==========
|
||||||
@ -223,7 +223,7 @@ typedef struct Agg
|
|||||||
int numAgg;
|
int numAgg;
|
||||||
Aggreg **aggs;
|
Aggreg **aggs;
|
||||||
AggState *aggstate;
|
AggState *aggstate;
|
||||||
} Agg;
|
} Agg;
|
||||||
|
|
||||||
/* ---------------
|
/* ---------------
|
||||||
* group node -
|
* group node -
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: primnodes.h,v 1.9 1997/09/08 02:37:27 momjian Exp $
|
* $Id: primnodes.h,v 1.10 1997/09/08 20:58:50 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -267,7 +267,7 @@ typedef struct Aggreg
|
|||||||
Oid aggtype; /* type of final result */
|
Oid aggtype; /* type of final result */
|
||||||
Node *target; /* attribute to aggreg on */
|
Node *target; /* attribute to aggreg on */
|
||||||
int aggno; /* index to ecxt_values */
|
int aggno; /* index to ecxt_values */
|
||||||
} Aggreg;
|
} Aggreg;
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* Array
|
* Array
|
||||||
@ -294,7 +294,7 @@ typedef struct Array
|
|||||||
IntArray arraylow;
|
IntArray arraylow;
|
||||||
IntArray arrayhigh;
|
IntArray arrayhigh;
|
||||||
int arraylen;
|
int arraylen;
|
||||||
} Array;
|
} Array;
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* ArrayRef:
|
* ArrayRef:
|
||||||
@ -319,6 +319,6 @@ typedef struct ArrayRef
|
|||||||
List *reflowerindexpr;
|
List *reflowerindexpr;
|
||||||
Node *refexpr;
|
Node *refexpr;
|
||||||
Node *refassgnexpr;
|
Node *refassgnexpr;
|
||||||
} ArrayRef;
|
} ArrayRef;
|
||||||
|
|
||||||
#endif /* PRIMNODES_H */
|
#endif /* PRIMNODES_H */
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: clauses.h,v 1.5 1997/09/08 02:37:34 momjian Exp $
|
* $Id: clauses.h,v 1.6 1997/09/08 20:58:54 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -44,10 +44,10 @@ extern void fix_opid(Node * clause);
|
|||||||
extern List *fix_opids(List * clauses);
|
extern List *fix_opids(List * clauses);
|
||||||
extern void
|
extern void
|
||||||
get_relattval(Node * clause, int *relid,
|
get_relattval(Node * clause, int *relid,
|
||||||
AttrNumber * attno, Datum * constval, int *flag);
|
AttrNumber *attno, Datum * constval, int *flag);
|
||||||
extern void
|
extern void
|
||||||
get_rels_atts(Node * clause, int *relid1,
|
get_rels_atts(Node * clause, int *relid1,
|
||||||
AttrNumber * attno1, int *relid2, AttrNumber * attno2);
|
AttrNumber *attno1, int *relid2, AttrNumber *attno2);
|
||||||
extern void CommuteClause(Node * clause);
|
extern void CommuteClause(Node * clause);
|
||||||
|
|
||||||
#endif /* CLAUSES_H */
|
#endif /* CLAUSES_H */
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: planmain.h,v 1.3 1997/09/08 02:37:55 momjian Exp $
|
* $Id: planmain.h,v 1.4 1997/09/08 20:58:56 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -32,10 +32,10 @@ make_seqscan(List * qptlist, List * qpqual, Index scanrelid,
|
|||||||
extern Sort *
|
extern Sort *
|
||||||
make_sort(List * tlist, Oid tempid, Plan * lefttree,
|
make_sort(List * tlist, Oid tempid, Plan * lefttree,
|
||||||
int keycount);
|
int keycount);
|
||||||
extern Agg *make_agg(List * tlist, int nagg, Aggreg ** aggs);
|
extern Agg *make_agg(List * tlist, int nagg, Aggreg **aggs);
|
||||||
extern Group *
|
extern Group *
|
||||||
make_group(List * tlist, bool tuplePerGroup, int ngrp,
|
make_group(List * tlist, bool tuplePerGroup, int ngrp,
|
||||||
AttrNumber * grpColIdx, Sort * lefttree);
|
AttrNumber *grpColIdx, Sort * lefttree);
|
||||||
extern Unique *make_unique(List * tlist, Plan * lefttree, char *uniqueAttr);
|
extern Unique *make_unique(List * tlist, Plan * lefttree, char *uniqueAttr);
|
||||||
extern List *generate_fjoin(List * tlist);
|
extern List *generate_fjoin(List * tlist);
|
||||||
|
|
||||||
@ -59,8 +59,8 @@ extern List *
|
|||||||
index_outerjoin_references(List * inner_indxqual,
|
index_outerjoin_references(List * inner_indxqual,
|
||||||
List * outer_tlist, Index inner_relid);
|
List * outer_tlist, Index inner_relid);
|
||||||
extern void set_result_tlist_references(Result * resultNode);
|
extern void set_result_tlist_references(Result * resultNode);
|
||||||
extern void set_agg_tlist_references(Agg * aggNode);
|
extern void set_agg_tlist_references(Agg *aggNode);
|
||||||
extern void set_agg_agglist_references(Agg * aggNode);
|
extern void set_agg_agglist_references(Agg *aggNode);
|
||||||
|
|
||||||
|
|
||||||
#endif /* PLANMAIN_H */
|
#endif /* PLANMAIN_H */
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: block.h,v 1.4 1997/09/08 02:38:55 momjian Exp $
|
* $Id: block.h,v 1.5 1997/09/08 20:58:59 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -51,7 +51,7 @@ typedef struct BlockIdData
|
|||||||
{
|
{
|
||||||
uint16 bi_hi;
|
uint16 bi_hi;
|
||||||
uint16 bi_lo;
|
uint16 bi_lo;
|
||||||
} BlockIdData;
|
} BlockIdData;
|
||||||
|
|
||||||
typedef BlockIdData *BlockId; /* block identifier */
|
typedef BlockIdData *BlockId; /* block identifier */
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: buf_internals.h,v 1.16 1997/09/08 02:38:57 momjian Exp $
|
* $Id: buf_internals.h,v 1.17 1997/09/08 20:59:00 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTE
|
* NOTE
|
||||||
* If BUFFERPAGE0 is defined, then 0 will be used as a
|
* If BUFFERPAGE0 is defined, then 0 will be used as a
|
||||||
@ -203,18 +203,18 @@ typedef struct _bmtrace
|
|||||||
/* Internal routines: only called by buf.c */
|
/* Internal routines: only called by buf.c */
|
||||||
|
|
||||||
/*freelist.c*/
|
/*freelist.c*/
|
||||||
extern void AddBufferToFreelist(BufferDesc * bf);
|
extern void AddBufferToFreelist(BufferDesc *bf);
|
||||||
extern void PinBuffer(BufferDesc * buf);
|
extern void PinBuffer(BufferDesc *buf);
|
||||||
extern void PinBuffer_Debug(char *file, int line, BufferDesc * buf);
|
extern void PinBuffer_Debug(char *file, int line, BufferDesc *buf);
|
||||||
extern void UnpinBuffer(BufferDesc * buf);
|
extern void UnpinBuffer(BufferDesc *buf);
|
||||||
extern BufferDesc *GetFreeBuffer(void);
|
extern BufferDesc *GetFreeBuffer(void);
|
||||||
extern void InitFreeList(bool init);
|
extern void InitFreeList(bool init);
|
||||||
|
|
||||||
/* buf_table.c */
|
/* buf_table.c */
|
||||||
extern void InitBufTable(void);
|
extern void InitBufTable(void);
|
||||||
extern BufferDesc *BufTableLookup(BufferTag * tagPtr);
|
extern BufferDesc *BufTableLookup(BufferTag * tagPtr);
|
||||||
extern bool BufTableDelete(BufferDesc * buf);
|
extern bool BufTableDelete(BufferDesc *buf);
|
||||||
extern bool BufTableInsert(BufferDesc * buf);
|
extern bool BufTableInsert(BufferDesc *buf);
|
||||||
|
|
||||||
/* bufmgr.c */
|
/* bufmgr.c */
|
||||||
extern BufferDesc *BufferDescriptors;
|
extern BufferDesc *BufferDescriptors;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: bufmgr.h,v 1.13 1997/09/08 02:38:58 momjian Exp $
|
* $Id: bufmgr.h,v 1.14 1997/09/08 20:59:05 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -71,13 +71,13 @@ extern int ShowPinTrace;
|
|||||||
/*
|
/*
|
||||||
* prototypes for functions in bufmgr.c
|
* prototypes for functions in bufmgr.c
|
||||||
*/
|
*/
|
||||||
extern Buffer
|
extern Buffer
|
||||||
RelationGetBufferWithBuffer(Relation relation,
|
RelationGetBufferWithBuffer(Relation relation,
|
||||||
BlockNumber blockNumber, Buffer buffer);
|
BlockNumber blockNumber, Buffer buffer);
|
||||||
extern Buffer ReadBuffer(Relation reln, BlockNumber blockNum);
|
extern Buffer ReadBuffer(Relation reln, BlockNumber blockNum);
|
||||||
extern int WriteBuffer(Buffer buffer);
|
extern int WriteBuffer(Buffer buffer);
|
||||||
extern int WriteNoReleaseBuffer(Buffer buffer);
|
extern int WriteNoReleaseBuffer(Buffer buffer);
|
||||||
extern Buffer
|
extern Buffer
|
||||||
ReleaseAndReadBuffer(Buffer buffer, Relation relation,
|
ReleaseAndReadBuffer(Buffer buffer, Relation relation,
|
||||||
BlockNumber blockNum);
|
BlockNumber blockNum);
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: shmem.h,v 1.7 1997/09/08 02:39:08 momjian Exp $
|
* $Id: shmem.h,v 1.8 1997/09/08 20:59:07 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -91,7 +91,7 @@ typedef struct
|
|||||||
char key[BTABLE_KEYSIZE]; /* string name */
|
char key[BTABLE_KEYSIZE]; /* string name */
|
||||||
unsigned long location; /* location in shared mem */
|
unsigned long location; /* location in shared mem */
|
||||||
unsigned long size; /* numbytes allocated for the structure */
|
unsigned long size; /* numbytes allocated for the structure */
|
||||||
} BindingEnt;
|
} BindingEnt;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* prototypes for functions in shmqueue.c
|
* prototypes for functions in shmqueue.c
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: acl.h,v 1.9 1997/09/08 02:39:24 momjian Exp $
|
* $Id: acl.h,v 1.10 1997/09/08 20:59:15 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* For backward-compatability purposes we have to allow there
|
* For backward-compatability purposes we have to allow there
|
||||||
@ -74,7 +74,7 @@ typedef struct AclItem
|
|||||||
AclId ai_id;
|
AclId ai_id;
|
||||||
AclIdType ai_idtype;
|
AclIdType ai_idtype;
|
||||||
AclMode ai_mode;
|
AclMode ai_mode;
|
||||||
} AclItem;
|
} AclItem;
|
||||||
|
|
||||||
/* Note: if the size of AclItem changes,
|
/* Note: if the size of AclItem changes,
|
||||||
change the aclitem typlen in pg_type.h */
|
change the aclitem typlen in pg_type.h */
|
||||||
@ -137,7 +137,7 @@ extern char *aclcheck_error_strings[];
|
|||||||
*/
|
*/
|
||||||
extern Acl *aclownerdefault(AclId ownerid);
|
extern Acl *aclownerdefault(AclId ownerid);
|
||||||
extern Acl *acldefault(void);
|
extern Acl *acldefault(void);
|
||||||
extern Acl *aclinsert3(Acl * old_acl, AclItem * mod_aip, unsigned modechg);
|
extern Acl *aclinsert3(Acl *old_acl, AclItem *mod_aip, unsigned modechg);
|
||||||
|
|
||||||
extern char *aclmakepriv(char *old_privlist, char new_priv);
|
extern char *aclmakepriv(char *old_privlist, char new_priv);
|
||||||
extern char *aclmakeuser(char *user_type, char *user);
|
extern char *aclmakeuser(char *user_type, char *user);
|
||||||
@ -150,15 +150,15 @@ makeAclStmt(char *privs, List * rel_list, char *grantee,
|
|||||||
*/
|
*/
|
||||||
extern Acl *makeacl(int n);
|
extern Acl *makeacl(int n);
|
||||||
extern AclItem *aclitemin(char *s);
|
extern AclItem *aclitemin(char *s);
|
||||||
extern char *aclitemout(AclItem * aip);
|
extern char *aclitemout(AclItem *aip);
|
||||||
extern Acl *aclinsert(Acl * old_acl, AclItem * mod_aip);
|
extern Acl *aclinsert(Acl *old_acl, AclItem *mod_aip);
|
||||||
extern Acl *aclremove(Acl * old_acl, AclItem * mod_aip);
|
extern Acl *aclremove(Acl *old_acl, AclItem *mod_aip);
|
||||||
extern int32 aclcontains(Acl * acl, AclItem * aip);
|
extern int32 aclcontains(Acl *acl, AclItem *aip);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* prototypes for functions in aclchk.c
|
* prototypes for functions in aclchk.c
|
||||||
*/
|
*/
|
||||||
extern void ChangeAcl(char *relname, AclItem * mod_aip, unsigned modechg);
|
extern void ChangeAcl(char *relname, AclItem *mod_aip, unsigned modechg);
|
||||||
extern AclId get_grosysid(char *groname);
|
extern AclId get_grosysid(char *groname);
|
||||||
extern char *get_groname(AclId grosysid);
|
extern char *get_groname(AclId grosysid);
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: array.h,v 1.6 1997/09/08 02:39:26 momjian Exp $
|
* $Id: array.h,v 1.7 1997/09/08 20:59:18 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* XXX the data array should be LONGALIGN'd -- notice that the array
|
* XXX the data array should be LONGALIGN'd -- notice that the array
|
||||||
@ -29,7 +29,7 @@ typedef struct
|
|||||||
int size; /* total array size (in bytes) */
|
int size; /* total array size (in bytes) */
|
||||||
int ndim; /* # of dimensions */
|
int ndim; /* # of dimensions */
|
||||||
int flags; /* implementation flags */
|
int flags; /* implementation flags */
|
||||||
} ArrayType;
|
} ArrayType;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* bitmask of ArrayType flags field:
|
* bitmask of ArrayType flags field:
|
||||||
@ -115,22 +115,22 @@ typedef struct
|
|||||||
* prototypes for functions defined in arrayfuncs.c
|
* prototypes for functions defined in arrayfuncs.c
|
||||||
*/
|
*/
|
||||||
extern char *array_in(char *string, Oid element_type);
|
extern char *array_in(char *string, Oid element_type);
|
||||||
extern char *array_out(ArrayType * v, Oid element_type);
|
extern char *array_out(ArrayType *v, Oid element_type);
|
||||||
extern char *array_dims(ArrayType * v, bool * isNull);
|
extern char *array_dims(ArrayType *v, bool * isNull);
|
||||||
extern Datum
|
extern Datum
|
||||||
array_ref(ArrayType * array, int n, int indx[], int reftype,
|
array_ref(ArrayType *array, int n, int indx[], int reftype,
|
||||||
int elmlen, int arraylen, bool * isNull);
|
int elmlen, int arraylen, bool * isNull);
|
||||||
extern Datum
|
extern Datum
|
||||||
array_clip(ArrayType * array, int n, int upperIndx[],
|
array_clip(ArrayType *array, int n, int upperIndx[],
|
||||||
int lowerIndx[], int reftype, int len, bool * isNull);
|
int lowerIndx[], int reftype, int len, bool * isNull);
|
||||||
extern char *
|
extern char *
|
||||||
array_set(ArrayType * array, int n, int indx[], char *dataPtr,
|
array_set(ArrayType *array, int n, int indx[], char *dataPtr,
|
||||||
int reftype, int elmlen, int arraylen, bool * isNull);
|
int reftype, int elmlen, int arraylen, bool * isNull);
|
||||||
extern char *
|
extern char *
|
||||||
array_assgn(ArrayType * array, int n, int upperIndx[],
|
array_assgn(ArrayType *array, int n, int upperIndx[],
|
||||||
int lowerIndx[], ArrayType * newArr, int reftype,
|
int lowerIndx[], ArrayType *newArr, int reftype,
|
||||||
int len, bool * isNull);
|
int len, bool * isNull);
|
||||||
extern int array_eq(ArrayType * array1, ArrayType * array2);
|
extern int array_eq(ArrayType *array1, ArrayType *array2);
|
||||||
extern int
|
extern int
|
||||||
_LOtransfer(char **destfd, int size, int nitems, char **srcfd,
|
_LOtransfer(char **destfd, int size, int nitems, char **srcfd,
|
||||||
int isSrcLO, int isDestLO);
|
int isSrcLO, int isDestLO);
|
||||||
@ -161,10 +161,10 @@ _ChunkArray(int fd, FILE * afd, int ndim, int dim[], int baseSize,
|
|||||||
int *nbytes, char *chunkfile);
|
int *nbytes, char *chunkfile);
|
||||||
extern int
|
extern int
|
||||||
_ReadChunkArray(int st[], int endp[], int bsize, int fp,
|
_ReadChunkArray(int st[], int endp[], int bsize, int fp,
|
||||||
char *destfp, ArrayType * array, int isDestLO, bool * isNull);
|
char *destfp, ArrayType *array, int isDestLO, bool * isNull);
|
||||||
extern struct varlena *
|
extern struct varlena *
|
||||||
_ReadChunkArray1El(int st[], int bsize, int fp,
|
_ReadChunkArray1El(int st[], int bsize, int fp,
|
||||||
ArrayType * array, bool * isNull);
|
ArrayType *array, bool * isNull);
|
||||||
|
|
||||||
|
|
||||||
#endif /* ARRAY_H */
|
#endif /* ARRAY_H */
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: builtins.h,v 1.23 1997/09/08 02:39:32 momjian Exp $
|
* $Id: builtins.h,v 1.24 1997/09/08 20:59:19 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* This should normally only be included by fmgr.h.
|
* This should normally only be included by fmgr.h.
|
||||||
@ -199,10 +199,10 @@ extern int32 btnamecmp(NameData * a, NameData * b);
|
|||||||
extern int32 bttextcmp(struct varlena * a, struct varlena * b);
|
extern int32 bttextcmp(struct varlena * a, struct varlena * b);
|
||||||
|
|
||||||
/* support routines for the rtree access method, by opclass */
|
/* support routines for the rtree access method, by opclass */
|
||||||
extern BOX *rt_box_union(BOX * a, BOX * b);
|
extern BOX *rt_box_union(BOX *a, BOX *b);
|
||||||
extern BOX *rt_box_inter(BOX * a, BOX * b);
|
extern BOX *rt_box_inter(BOX *a, BOX *b);
|
||||||
extern void rt_box_size(BOX * a, float *size);
|
extern void rt_box_size(BOX *a, float *size);
|
||||||
extern void rt_bigbox_size(BOX * a, float *size);
|
extern void rt_bigbox_size(BOX *a, float *size);
|
||||||
extern void rt_poly_size(POLYGON * a, float *size);
|
extern void rt_poly_size(POLYGON * a, float *size);
|
||||||
extern POLYGON *rt_poly_union(POLYGON * a, POLYGON * b);
|
extern POLYGON *rt_poly_union(POLYGON * a, POLYGON * b);
|
||||||
extern POLYGON *rt_poly_inter(POLYGON * a, POLYGON * b);
|
extern POLYGON *rt_poly_inter(POLYGON * a, POLYGON * b);
|
||||||
@ -338,7 +338,7 @@ extern bool float84gt(float64 arg1, float32 arg2);
|
|||||||
extern bool float84ge(float64 arg1, float32 arg2);
|
extern bool float84ge(float64 arg1, float32 arg2);
|
||||||
|
|
||||||
/* geo_ops.c, geo_selfuncs.c */
|
/* geo_ops.c, geo_selfuncs.c */
|
||||||
extern double *box_area(BOX * box);
|
extern double *box_area(BOX *box);
|
||||||
|
|
||||||
/* misc.c */
|
/* misc.c */
|
||||||
extern bool nullvalue(Datum value, bool * isNull);
|
extern bool nullvalue(Datum value, bool * isNull);
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: geo_decls.h,v 1.10 1997/09/08 02:39:46 momjian Exp $
|
* $Id: geo_decls.h,v 1.11 1997/09/08 20:59:21 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTE
|
* NOTE
|
||||||
* These routines do *not* use the float types from adt/.
|
* These routines do *not* use the float types from adt/.
|
||||||
@ -120,7 +120,7 @@ typedef struct
|
|||||||
{
|
{
|
||||||
Point high,
|
Point high,
|
||||||
low; /* corner POINTs */
|
low; /* corner POINTs */
|
||||||
} BOX;
|
} BOX;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
/*---------------------------------------------------------------------
|
||||||
* POLYGON - Specified by an array of doubles defining the points,
|
* POLYGON - Specified by an array of doubles defining the points,
|
||||||
@ -187,65 +187,65 @@ extern Point *lseg_interpt(LSEG * l1, LSEG * l2);
|
|||||||
extern double *dist_pl(Point * pt, LINE * line);
|
extern double *dist_pl(Point * pt, LINE * line);
|
||||||
extern double *dist_ps(Point * pt, LSEG * lseg);
|
extern double *dist_ps(Point * pt, LSEG * lseg);
|
||||||
extern double *dist_ppath(Point * pt, PATH * path);
|
extern double *dist_ppath(Point * pt, PATH * path);
|
||||||
extern double *dist_pb(Point * pt, BOX * box);
|
extern double *dist_pb(Point * pt, BOX *box);
|
||||||
extern double *dist_sl(LSEG * lseg, LINE * line);
|
extern double *dist_sl(LSEG * lseg, LINE * line);
|
||||||
extern double *dist_sb(LSEG * lseg, BOX * box);
|
extern double *dist_sb(LSEG * lseg, BOX *box);
|
||||||
extern double *dist_lb(LINE * line, BOX * box);
|
extern double *dist_lb(LINE * line, BOX *box);
|
||||||
extern Point *close_pl(Point * pt, LINE * line);
|
extern Point *close_pl(Point * pt, LINE * line);
|
||||||
extern Point *close_ps(Point * pt, LSEG * lseg);
|
extern Point *close_ps(Point * pt, LSEG * lseg);
|
||||||
extern Point *close_pb(Point * pt, BOX * box);
|
extern Point *close_pb(Point * pt, BOX *box);
|
||||||
extern Point *close_sl(LSEG * lseg, LINE * line);
|
extern Point *close_sl(LSEG * lseg, LINE * line);
|
||||||
extern Point *close_sb(LSEG * lseg, BOX * box);
|
extern Point *close_sb(LSEG * lseg, BOX *box);
|
||||||
extern Point *close_lb(LINE * line, BOX * box);
|
extern Point *close_lb(LINE * line, BOX *box);
|
||||||
extern bool on_pl(Point * pt, LINE * line);
|
extern bool on_pl(Point * pt, LINE * line);
|
||||||
extern bool on_ps(Point * pt, LSEG * lseg);
|
extern bool on_ps(Point * pt, LSEG * lseg);
|
||||||
extern bool on_pb(Point * pt, BOX * box);
|
extern bool on_pb(Point * pt, BOX *box);
|
||||||
extern bool on_ppath(Point * pt, PATH * path);
|
extern bool on_ppath(Point * pt, PATH * path);
|
||||||
extern bool on_sl(LSEG * lseg, LINE * line);
|
extern bool on_sl(LSEG * lseg, LINE * line);
|
||||||
extern bool on_sb(LSEG * lseg, BOX * box);
|
extern bool on_sb(LSEG * lseg, BOX *box);
|
||||||
extern bool inter_sl(LSEG * lseg, LINE * line);
|
extern bool inter_sl(LSEG * lseg, LINE * line);
|
||||||
extern bool inter_sb(LSEG * lseg, BOX * box);
|
extern bool inter_sb(LSEG * lseg, BOX *box);
|
||||||
extern bool inter_lb(LINE * line, BOX * box);
|
extern bool inter_lb(LINE * line, BOX *box);
|
||||||
|
|
||||||
/* private routines */
|
/* private routines */
|
||||||
extern LSEG *lseg_construct(Point * pt1, Point * pt2);
|
extern LSEG *lseg_construct(Point * pt1, Point * pt2);
|
||||||
|
|
||||||
/* public box routines */
|
/* public box routines */
|
||||||
extern BOX *box_in(char *str);
|
extern BOX *box_in(char *str);
|
||||||
extern char *box_out(BOX * box);
|
extern char *box_out(BOX *box);
|
||||||
extern bool box_same(BOX * box1, BOX * box2);
|
extern bool box_same(BOX *box1, BOX *box2);
|
||||||
extern bool box_overlap(BOX * box1, BOX * box2);
|
extern bool box_overlap(BOX *box1, BOX *box2);
|
||||||
extern bool box_overleft(BOX * box1, BOX * box2);
|
extern bool box_overleft(BOX *box1, BOX *box2);
|
||||||
extern bool box_left(BOX * box1, BOX * box2);
|
extern bool box_left(BOX *box1, BOX *box2);
|
||||||
extern bool box_right(BOX * box1, BOX * box2);
|
extern bool box_right(BOX *box1, BOX *box2);
|
||||||
extern bool box_overright(BOX * box1, BOX * box2);
|
extern bool box_overright(BOX *box1, BOX *box2);
|
||||||
extern bool box_contained(BOX * box1, BOX * box2);
|
extern bool box_contained(BOX *box1, BOX *box2);
|
||||||
extern bool box_contain(BOX * box1, BOX * box2);
|
extern bool box_contain(BOX *box1, BOX *box2);
|
||||||
extern bool box_below(BOX * box1, BOX * box2);
|
extern bool box_below(BOX *box1, BOX *box2);
|
||||||
extern bool box_above(BOX * box1, BOX * box2);
|
extern bool box_above(BOX *box1, BOX *box2);
|
||||||
extern bool box_lt(BOX * box1, BOX * box2);
|
extern bool box_lt(BOX *box1, BOX *box2);
|
||||||
extern bool box_gt(BOX * box1, BOX * box2);
|
extern bool box_gt(BOX *box1, BOX *box2);
|
||||||
extern bool box_eq(BOX * box1, BOX * box2);
|
extern bool box_eq(BOX *box1, BOX *box2);
|
||||||
extern bool box_le(BOX * box1, BOX * box2);
|
extern bool box_le(BOX *box1, BOX *box2);
|
||||||
extern bool box_ge(BOX * box1, BOX * box2);
|
extern bool box_ge(BOX *box1, BOX *box2);
|
||||||
extern Point *box_center(BOX * box);
|
extern Point *box_center(BOX *box);
|
||||||
extern double *box_area(BOX * box);
|
extern double *box_area(BOX *box);
|
||||||
extern double *box_width(BOX * box);
|
extern double *box_width(BOX *box);
|
||||||
extern double *box_height(BOX * box);
|
extern double *box_height(BOX *box);
|
||||||
extern double *box_distance(BOX * box1, BOX * box2);
|
extern double *box_distance(BOX *box1, BOX *box2);
|
||||||
extern Point *box_center(BOX * box);
|
extern Point *box_center(BOX *box);
|
||||||
extern BOX *box_intersect(BOX * box1, BOX * box2);
|
extern BOX *box_intersect(BOX *box1, BOX *box2);
|
||||||
extern LSEG *box_diagonal(BOX * box);
|
extern LSEG *box_diagonal(BOX *box);
|
||||||
|
|
||||||
/* private routines */
|
/* private routines */
|
||||||
|
|
||||||
extern double box_dt(BOX * box1, BOX * box2);
|
extern double box_dt(BOX *box1, BOX *box2);
|
||||||
|
|
||||||
extern BOX *box(Point * p1, Point * p2);
|
extern BOX *box(Point * p1, Point * p2);
|
||||||
extern BOX *box_add(BOX * box, Point * p);
|
extern BOX *box_add(BOX *box, Point * p);
|
||||||
extern BOX *box_sub(BOX * box, Point * p);
|
extern BOX *box_sub(BOX *box, Point * p);
|
||||||
extern BOX *box_mul(BOX * box, Point * p);
|
extern BOX *box_mul(BOX *box, Point * p);
|
||||||
extern BOX *box_div(BOX * box, Point * p);
|
extern BOX *box_div(BOX *box, Point * p);
|
||||||
|
|
||||||
/* private line routines */
|
/* private line routines */
|
||||||
extern double *line_distance(LINE * l1, LINE * l2);
|
extern double *line_distance(LINE * l1, LINE * l2);
|
||||||
@ -301,7 +301,7 @@ extern int4 poly_npoints(POLYGON * poly);
|
|||||||
extern Point *poly_center(POLYGON * poly);
|
extern Point *poly_center(POLYGON * poly);
|
||||||
extern BOX *poly_box(POLYGON * poly);
|
extern BOX *poly_box(POLYGON * poly);
|
||||||
extern PATH *poly_path(POLYGON * poly);
|
extern PATH *poly_path(POLYGON * poly);
|
||||||
extern POLYGON *box_poly(BOX * box);
|
extern POLYGON *box_poly(BOX *box);
|
||||||
|
|
||||||
extern POLYGON *upgradepoly(POLYGON * poly);
|
extern POLYGON *upgradepoly(POLYGON * poly);
|
||||||
extern POLYGON *revertpoly(POLYGON * poly);
|
extern POLYGON *revertpoly(POLYGON * poly);
|
||||||
@ -341,7 +341,7 @@ extern double *dist_pc(Point * point, CIRCLE * circle);
|
|||||||
extern double *dist_cpoly(CIRCLE * circle, POLYGON * poly);
|
extern double *dist_cpoly(CIRCLE * circle, POLYGON * poly);
|
||||||
extern Point *circle_center(CIRCLE * circle);
|
extern Point *circle_center(CIRCLE * circle);
|
||||||
extern CIRCLE *circle(Point * center, float8 * radius);
|
extern CIRCLE *circle(Point * center, float8 * radius);
|
||||||
extern CIRCLE *box_circle(BOX * box);
|
extern CIRCLE *box_circle(BOX *box);
|
||||||
extern BOX *circle_box(CIRCLE * circle);
|
extern BOX *circle_box(CIRCLE * circle);
|
||||||
extern CIRCLE *poly_circle(POLYGON * poly);
|
extern CIRCLE *poly_circle(POLYGON * poly);
|
||||||
extern POLYGON *circle_poly(int npts, CIRCLE * circle);
|
extern POLYGON *circle_poly(int npts, CIRCLE * circle);
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: memutils.h,v 1.10 1997/09/08 02:39:50 momjian Exp $
|
* $Id: memutils.h,v 1.11 1997/09/08 20:59:22 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* some of the information in this file will be moved to
|
* some of the information in this file will be moved to
|
||||||
@ -193,7 +193,7 @@ typedef enum AllocMode
|
|||||||
StaticAllocMode, /* always "statically" allocate */
|
StaticAllocMode, /* always "statically" allocate */
|
||||||
TunableAllocMode, /* allocations are "tuned" */
|
TunableAllocMode, /* allocations are "tuned" */
|
||||||
BoundedAllocMode /* allocations bounded to fixed usage */
|
BoundedAllocMode /* allocations bounded to fixed usage */
|
||||||
} AllocMode;
|
} AllocMode;
|
||||||
|
|
||||||
#define DefaultAllocMode DynamicAllocMode
|
#define DefaultAllocMode DynamicAllocMode
|
||||||
|
|
||||||
@ -205,7 +205,7 @@ typedef struct AllocSetData
|
|||||||
{
|
{
|
||||||
OrderedSetData setData;
|
OrderedSetData setData;
|
||||||
/* Note: this will change in the future to support other modes */
|
/* Note: this will change in the future to support other modes */
|
||||||
} AllocSetData;
|
} AllocSetData;
|
||||||
|
|
||||||
typedef AllocSetData *AllocSet;
|
typedef AllocSetData *AllocSet;
|
||||||
|
|
||||||
@ -228,7 +228,7 @@ extern void AllocSetReset(AllocSet set);
|
|||||||
extern bool AllocSetContains(AllocSet set, AllocPointer pointer);
|
extern bool AllocSetContains(AllocSet set, AllocPointer pointer);
|
||||||
extern AllocPointer AllocSetAlloc(AllocSet set, Size size);
|
extern AllocPointer AllocSetAlloc(AllocSet set, Size size);
|
||||||
extern void AllocSetFree(AllocSet set, AllocPointer pointer);
|
extern void AllocSetFree(AllocSet set, AllocPointer pointer);
|
||||||
extern AllocPointer
|
extern AllocPointer
|
||||||
AllocSetRealloc(AllocSet set, AllocPointer pointer,
|
AllocSetRealloc(AllocSet set, AllocPointer pointer,
|
||||||
Size size);
|
Size size);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Header: /cvsroot/pgsql/src/test/regress/regress.c,v 1.11 1997/09/08 02:40:56 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/test/regress/regress.c,v 1.12 1997/09/08 20:59:27 momjian Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <float.h> /* faked on sunos */
|
#include <float.h> /* faked on sunos */
|
||||||
@ -24,7 +24,7 @@ extern PATH *poly2path(POLYGON * poly);
|
|||||||
extern Point *interpt_pp(PATH * p1, PATH * p2);
|
extern Point *interpt_pp(PATH * p1, PATH * p2);
|
||||||
extern void regress_lseg_construct(LSEG * lseg, Point * pt1, Point * pt2);
|
extern void regress_lseg_construct(LSEG * lseg, Point * pt1, Point * pt2);
|
||||||
extern char overpaid(TUPLE tuple);
|
extern char overpaid(TUPLE tuple);
|
||||||
extern int boxarea(BOX * box);
|
extern int boxarea(BOX *box);
|
||||||
extern char *reverse_c16(char *string);
|
extern char *reverse_c16(char *string);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user