MobilityDB
1.1
meos
include
general
set.h
Go to the documentation of this file.
1
/*****************************************************************************
2
*
3
* This MobilityDB code is provided under The PostgreSQL License.
4
* Copyright (c) 2016-2023, Université libre de Bruxelles and MobilityDB
5
* contributors
6
*
7
* MobilityDB includes portions of PostGIS version 3 source code released
8
* under the GNU General Public License (GPLv2 or later).
9
* Copyright (c) 2001-2023, PostGIS contributors
10
*
11
* Permission to use, copy, modify, and distribute this software and its
12
* documentation for any purpose, without fee, and without a written
13
* agreement is hereby granted, provided that the above copyright notice and
14
* this paragraph and the following two paragraphs appear in all copies.
15
*
16
* IN NO EVENT SHALL UNIVERSITE LIBRE DE BRUXELLES BE LIABLE TO ANY PARTY FOR
17
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
18
* LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION,
19
* EVEN IF UNIVERSITE LIBRE DE BRUXELLES HAS BEEN ADVISED OF THE POSSIBILITY
20
* OF SUCH DAMAGE.
21
*
22
* UNIVERSITE LIBRE DE BRUXELLES SPECIFICALLY DISCLAIMS ANY WARRANTIES,
23
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
24
* AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON
25
* AN "AS IS" BASIS, AND UNIVERSITE LIBRE DE BRUXELLES HAS NO OBLIGATIONS TO
26
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
27
*
28
*****************************************************************************/
29
34
#ifndef __SET_H__
35
#define __SET_H__
36
37
/*****************************************************************************/
38
39
/*
40
* fmgr macros for ordered set types
41
*/
42
43
/* PostgreSQL */
44
#include <
postgres.h
>
45
/* MEOS */
46
#include <
meos.h
>
47
48
#if MEOS
49
#define DatumGetSetP(X) ((Set *) DatumGetPointer(X))
50
#else
51
#define DatumGetSetP(X) ((Set *) PG_DETOAST_DATUM(X))
52
#endif
/* MEOS */
53
#define SetPGetDatum(X) PointerGetDatum(X)
54
#define PG_GETARG_SET_P(X) ((Set *) PG_GETARG_VARLENA_P(X))
55
#define PG_RETURN_SET_P(X) PG_RETURN_POINTER(X)
56
57
#define MINIDX 0
58
#define MAXIDX count - 1
59
60
/*****************************************************************************
61
* Struct definition for the unnest operation
62
*****************************************************************************/
63
68
typedef
struct
69
{
70
bool
done
;
71
int
i
;
72
int
count
;
73
Set
*
set
;
/* Set to unnest */
74
Datum
*
values
;
/* Values obtained by getValues(temp) */
75
}
SetUnnestState
;
76
77
78
/*****************************************************************************/
79
80
/* General functions */
81
82
extern
bool
set_find_value
(
const
Set
*s,
Datum
,
int
*loc);
83
84
/*****************************************************************************/
85
86
#endif
/* __SET_H__ */
set_find_value
bool set_find_value(const Set *s, Datum, int *loc)
General functions for set values composed of an ordered list of distinct values.
Definition:
set.c:82
meos.h
Datum
uintptr_t Datum
Definition:
pg_ext_defs.in.h:4
postgres.h
SetUnnestState::i
int i
Definition:
set.h:71
SetUnnestState::count
int count
Definition:
set.h:72
SetUnnestState::values
Datum * values
Definition:
set.h:74
SetUnnestState::set
Set * set
Definition:
set.h:73
SetUnnestState::done
bool done
Definition:
set.h:70
SetUnnestState
Structure to represent information about an entry that can be placed to either group without affectin...
Definition:
set.h:69
Set
API of the Mobility Engine Open Source (MEOS) library.
Definition:
meos.h:56
Generated by
1.9.4