-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplruby_spi.h
More file actions
31 lines (26 loc) · 868 Bytes
/
Copy pathplruby_spi.h
File metadata and controls
31 lines (26 loc) · 868 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
* plruby_spi.h - Ruby-callable SPI/database API and interpreter setup.
*/
#ifndef PLRUBY_SPI_H
#define PLRUBY_SPI_H
#include "postgres.h"
#include "executor/spi.h"
#include "funcapi.h"
#include <ruby.h>
/*
* Register the global (Kernel) functions PL/Ruby exposes -- spi_exec, elog,
* quote_literal, return_next, ... -- plus $_SHARED and $stdout/$stderr
* redirection. Called once from plruby_init().
*/
extern void plruby_spi_init(void);
/*
* SRF support: state the running set-returning function and return_next()
* share, mirroring PL/php.
*/
extern FunctionCallInfo current_fcinfo;
extern TupleDesc current_tupledesc;
extern AttInMetadata *current_attinmeta;
extern MemoryContext current_memcxt;
extern Tuplestorestate *current_tuplestore;
extern VALUE current_srf_binding; /* Binding for a no-arg return_next() */
#endif /* PLRUBY_SPI_H */