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