Veil2
Postgres extension for VPD implementations
veil2.h
Go to the documentation of this file.
1 
14 #include "extension/pgbitmap/pgbitmap.h"
15 
20 typedef bool (Fetch_fn)(HeapTuple, TupleDesc, void *);
21 
22 
28 typedef struct {
30  int f1;
32  int f2;
33 } tuple_2ints;
34 
35 
36 
37 /* query.c */
38 extern void veil2_spi_connect(bool *p_pushed, const char *msg);
39 extern void veil2_spi_finish(bool pushed, const char *msg);
40 extern int veil2_query_wn(const char *qry,
41  int nargs,
42  Oid *argtypes,
43  Datum *args,
44  const char *nulls,
45  bool read_only,
46  void **saved_plan,
47  Fetch_fn process_row,
48  void *fn_param);
49 extern int veil2_query(const char *qry,
50  int nargs,
51  Oid *argtypes,
52  Datum *args,
53  bool read_only,
54  void **saved_plan,
55  Fetch_fn process_row,
56  void *fn_param);
57 
58 extern bool veil2_bool_from_query(const char *qry,
59  int nargs,
60  Oid *argtypes,
61  Datum *args,
62  void **saved_plan,
63  bool *result);
64 
65 
66 /* veil2.c */
67 Datum veil2_session_ready(PG_FUNCTION_ARGS);
68 Datum veil2_reset_session(PG_FUNCTION_ARGS);
69 Datum veil2_reset_session_privs(PG_FUNCTION_ARGS);
70 Datum veil2_true(PG_FUNCTION_ARGS);
71 Datum veil2_i_have_global_priv(PG_FUNCTION_ARGS);
72 Datum veil2_i_have_personal_priv(PG_FUNCTION_ARGS);
73 Datum veil2_i_have_priv_in_scope(PG_FUNCTION_ARGS);
74 Datum veil2_i_have_priv_in_scope_or_global(PG_FUNCTION_ARGS);
75 Datum veil2_i_have_priv_in_superior_scope(PG_FUNCTION_ARGS);
76 Datum veil2_i_have_priv_in_scope_or_superior(PG_FUNCTION_ARGS);
78 Datum veil2_result_counts(PG_FUNCTION_ARGS);
79 Datum veil2_docpath(PG_FUNCTION_ARGS);
80 Datum veil2_datapath(PG_FUNCTION_ARGS);
81 
82 
83 #ifndef DOCS_PATH
84 #define DOCS_PATH "<path to postgres extension docs>"
85 #endif
86 
87 #ifndef DATA_PATH
88 #define DATA_PATH "<path to postgres extension data files>"
89 #endif
90 
Datum veil2_i_have_priv_in_scope_or_superior(PG_FUNCTION_ARGS)
Datum veil2_i_have_priv_in_scope_or_global(PG_FUNCTION_ARGS)
Datum veil2_result_counts(PG_FUNCTION_ARGS)
int f1
Definition: veil2.h:30
void veil2_spi_finish(bool pushed, const char *msg)
Definition: query.c:66
Datum veil2_reset_session(PG_FUNCTION_ARGS)
Datum veil2_docpath(PG_FUNCTION_ARGS)
Datum veil2_i_have_priv_in_superior_scope(PG_FUNCTION_ARGS)
void veil2_spi_connect(bool *p_pushed, const char *msg)
Definition: query.c:38
Datum veil2_i_have_personal_priv(PG_FUNCTION_ARGS)
int f2
Definition: veil2.h:32
Datum veil2_reset_session_privs(PG_FUNCTION_ARGS)
bool() Fetch_fn(HeapTuple, TupleDesc, void *)
Definition: veil2.h:20
Datum veil2_i_have_global_priv(PG_FUNCTION_ARGS)
Datum veil2_session_ready(PG_FUNCTION_ARGS)
int veil2_query_wn(const char *qry, int nargs, Oid *argtypes, Datum *args, const char *nulls, bool read_only, void **saved_plan, Fetch_fn process_row, void *fn_param)
Definition: query.c:165
Datum veil2_datapath(PG_FUNCTION_ARGS)
int veil2_query(const char *qry, int nargs, Oid *argtypes, Datum *args, bool read_only, void **saved_plan, Fetch_fn process_row, void *fn_param)
Definition: query.c:218
Datum veil2_i_have_priv_in_scope_or_superior_or_global(PG_FUNCTION_ARGS)
Datum veil2_i_have_priv_in_scope(PG_FUNCTION_ARGS)
bool veil2_bool_from_query(const char *qry, int nargs, Oid *argtypes, Datum *args, void **saved_plan, bool *result)
Definition: query.c:267
Datum veil2_true(PG_FUNCTION_ARGS)