~ubuntu-branches/ubuntu/natty/postgresql-8.4/natty-security

« back to all changes in this revision

Viewing changes to contrib/intarray/_int.h

Tags: upstream-8.4.0
ImportĀ upstreamĀ versionĀ 8.4.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * $PostgreSQL: pgsql/contrib/intarray/_int.h,v 1.16 2008/05/17 01:28:19 adunstan Exp $ 
 
2
 * $PostgreSQL: pgsql/contrib/intarray/_int.h,v 1.17 2009/06/11 14:48:51 momjian Exp $
3
3
 */
4
4
#ifndef ___INT_H__
5
5
#define ___INT_H__
78
78
        int32           vl_len_;                /* varlena header (do not touch directly!) */
79
79
        int4            flag;
80
80
        char            data[1];
81
 
}       GISTTYPE;
 
81
} GISTTYPE;
82
82
 
83
83
#define ALLISTRUE               0x04
84
84
 
131
131
        int2            type;
132
132
        int2            left;
133
133
        int4            val;
134
 
}       ITEM;
 
134
} ITEM;
135
135
 
136
136
typedef struct
137
137
{
138
138
        int32           vl_len_;                /* varlena header (do not touch directly!) */
139
139
        int4            size;
140
140
        char            data[1];
141
 
}       QUERYTYPE;
 
141
} QUERYTYPE;
142
142
 
143
143
#define HDRSIZEQT       (VARHDRSZ + sizeof(int4))
144
144
#define COMPUTESIZE(size)       ( HDRSIZEQT + size * sizeof(ITEM) )
151
151
#define OPEN    4
152
152
#define CLOSE   5
153
153
 
154
 
bool            signconsistent(QUERYTYPE * query, BITVEC sign, bool calcnot);
155
 
bool            execconsistent(QUERYTYPE * query, ArrayType *array, bool calcnot);
156
 
bool            ginconsistent(QUERYTYPE * query, bool *check);
157
 
int4            shorterquery(ITEM * q, int4 len);
 
154
bool            signconsistent(QUERYTYPE *query, BITVEC sign, bool calcnot);
 
155
bool            execconsistent(QUERYTYPE *query, ArrayType *array, bool calcnot);
 
156
bool            ginconsistent(QUERYTYPE *query, bool *check);
 
157
int4            shorterquery(ITEM *q, int4 len);
158
158
 
159
159
int                     compASC(const void *a, const void *b);
160
160
 
165
165
                qsort((void*)ARRPTR(a), ARRNELEMS(a),sizeof(int4),              \
166
166
                                (direction) ? compASC : compDESC )
167
167
 
168
 
#endif /* ___INT_H__ */
 
168
#endif   /* ___INT_H__ */