Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
f9de1e9a
Commit
f9de1e9a
authored
Dec 29, 2011
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PL/Python: Add argument names to function declarations
For easier source reading
parent
a671d940
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
106 additions
and
106 deletions
+106
-106
src/pl/plpython/plpy_cursorobject.c
src/pl/plpython/plpy_cursorobject.c
+6
-6
src/pl/plpython/plpy_cursorobject.h
src/pl/plpython/plpy_cursorobject.h
+1
-1
src/pl/plpython/plpy_elog.c
src/pl/plpython/plpy_elog.c
+4
-4
src/pl/plpython/plpy_elog.h
src/pl/plpython/plpy_elog.h
+3
-3
src/pl/plpython/plpy_exec.c
src/pl/plpython/plpy_exec.c
+12
-12
src/pl/plpython/plpy_exec.h
src/pl/plpython/plpy_exec.h
+2
-2
src/pl/plpython/plpy_main.c
src/pl/plpython/plpy_main.c
+3
-3
src/pl/plpython/plpy_planobject.c
src/pl/plpython/plpy_planobject.c
+2
-2
src/pl/plpython/plpy_planobject.h
src/pl/plpython/plpy_planobject.h
+1
-1
src/pl/plpython/plpy_plpymodule.c
src/pl/plpython/plpy_plpymodule.c
+12
-12
src/pl/plpython/plpy_procedure.c
src/pl/plpython/plpy_procedure.c
+4
-4
src/pl/plpython/plpy_procedure.h
src/pl/plpython/plpy_procedure.h
+4
-4
src/pl/plpython/plpy_resultobject.c
src/pl/plpython/plpy_resultobject.c
+8
-8
src/pl/plpython/plpy_spi.c
src/pl/plpython/plpy_spi.c
+4
-4
src/pl/plpython/plpy_spi.h
src/pl/plpython/plpy_spi.h
+2
-2
src/pl/plpython/plpy_subxactobject.c
src/pl/plpython/plpy_subxactobject.c
+3
-3
src/pl/plpython/plpy_subxactobject.h
src/pl/plpython/plpy_subxactobject.h
+1
-1
src/pl/plpython/plpy_typeio.c
src/pl/plpython/plpy_typeio.c
+21
-21
src/pl/plpython/plpy_typeio.h
src/pl/plpython/plpy_typeio.h
+9
-9
src/pl/plpython/plpy_util.h
src/pl/plpython/plpy_util.h
+4
-4
No files found.
src/pl/plpython/plpy_cursorobject.c
View file @
f9de1e9a
...
...
@@ -20,12 +20,12 @@
#include "plpy_spi.h"
static
PyObject
*
PLy_cursor_query
(
const
char
*
);
static
PyObject
*
PLy_cursor_plan
(
PyObject
*
,
PyObject
*
);
static
void
PLy_cursor_dealloc
(
PyObject
*
);
static
PyObject
*
PLy_cursor_iternext
(
PyObject
*
);
static
PyObject
*
PLy_cursor_fetch
(
PyObject
*
,
PyObject
*
);
static
PyObject
*
PLy_cursor_close
(
PyObject
*
,
PyObject
*
);
static
PyObject
*
PLy_cursor_query
(
const
char
*
query
);
static
PyObject
*
PLy_cursor_plan
(
PyObject
*
ob
,
PyObject
*
args
);
static
void
PLy_cursor_dealloc
(
PyObject
*
arg
);
static
PyObject
*
PLy_cursor_iternext
(
PyObject
*
self
);
static
PyObject
*
PLy_cursor_fetch
(
PyObject
*
self
,
PyObject
*
args
);
static
PyObject
*
PLy_cursor_close
(
PyObject
*
self
,
PyObject
*
unused
);
static
char
PLy_cursor_doc
[]
=
{
"Wrapper around a PostgreSQL cursor"
...
...
src/pl/plpython/plpy_cursorobject.h
View file @
f9de1e9a
...
...
@@ -17,6 +17,6 @@ typedef struct PLyCursorObject
}
PLyCursorObject
;
extern
void
PLy_cursor_init_type
(
void
);
extern
PyObject
*
PLy_cursor
(
PyObject
*
,
PyObject
*
);
extern
PyObject
*
PLy_cursor
(
PyObject
*
self
,
PyObject
*
args
);
#endif
/* PLPY_CURSOROBJECT_H */
src/pl/plpython/plpy_elog.c
View file @
f9de1e9a
...
...
@@ -20,10 +20,10 @@ PyObject *PLy_exc_fatal = NULL;
PyObject
*
PLy_exc_spi_error
=
NULL
;
static
void
PLy_traceback
(
char
**
,
char
**
,
int
*
);
static
void
PLy_get_spi_error_data
(
PyObject
*
,
int
*
,
char
**
,
char
**
,
char
**
,
int
*
);
static
char
*
get_source_line
(
const
char
*
,
int
);
static
void
PLy_traceback
(
char
**
xmsg
,
char
**
tbmsg
,
int
*
tb_depth
);
static
void
PLy_get_spi_error_data
(
PyObject
*
exc
,
int
*
sqlerrcode
,
char
**
detail
,
char
**
hint
,
char
**
query
,
int
*
position
);
static
char
*
get_source_line
(
const
char
*
src
,
int
lineno
);
/*
...
...
src/pl/plpython/plpy_elog.h
View file @
f9de1e9a
...
...
@@ -10,13 +10,13 @@ extern PyObject *PLy_exc_error;
extern
PyObject
*
PLy_exc_fatal
;
extern
PyObject
*
PLy_exc_spi_error
;
extern
void
PLy_elog
(
int
,
const
char
*
,...)
extern
void
PLy_elog
(
int
elevel
,
const
char
*
fmt
,...)
__attribute__
((
format
(
PG_PRINTF_ATTRIBUTE
,
2
,
3
)));
extern
void
PLy_exception_set
(
PyObject
*
,
const
char
*
,...)
extern
void
PLy_exception_set
(
PyObject
*
exc
,
const
char
*
fmt
,...)
__attribute__
((
format
(
PG_PRINTF_ATTRIBUTE
,
2
,
3
)));
extern
void
PLy_exception_set_plural
(
PyObject
*
,
const
char
*
,
const
char
*
,
extern
void
PLy_exception_set_plural
(
PyObject
*
exc
,
const
char
*
fmt_singular
,
const
char
*
fmt_plural
,
unsigned
long
n
,...)
__attribute__
((
format
(
PG_PRINTF_ATTRIBUTE
,
2
,
5
)))
__attribute__
((
format
(
PG_PRINTF_ATTRIBUTE
,
3
,
5
)));
...
...
src/pl/plpython/plpy_exec.c
View file @
f9de1e9a
...
...
@@ -25,18 +25,18 @@
#include "plpy_subxactobject.h"
static
PyObject
*
PLy_function_build_args
(
FunctionCallInfo
,
PLyProcedure
*
);
static
void
PLy_function_delete_args
(
PLyProcedure
*
);
static
void
plpython_return_error_callback
(
void
*
);
static
PyObject
*
PLy_trigger_build_args
(
FunctionCallInfo
,
PLyProcedure
*
,
HeapTuple
*
);
static
HeapTuple
PLy_modify_tuple
(
PLyProcedure
*
,
PyObject
*
,
TriggerData
*
,
HeapTuple
);
static
void
plpython_trigger_error_callback
(
void
*
);
static
PyObject
*
PLy_procedure_call
(
PLyProcedure
*
,
char
*
,
PyObject
*
);
static
void
PLy_abort_open_subtransactions
(
int
);
static
PyObject
*
PLy_function_build_args
(
FunctionCallInfo
fcinfo
,
PLyProcedure
*
proc
);
static
void
PLy_function_delete_args
(
PLyProcedure
*
proc
);
static
void
plpython_return_error_callback
(
void
*
arg
);
static
PyObject
*
PLy_trigger_build_args
(
FunctionCallInfo
fcinfo
,
PLyProcedure
*
proc
,
HeapTuple
*
rv
);
static
HeapTuple
PLy_modify_tuple
(
PLyProcedure
*
proc
,
PyObject
*
pltd
,
TriggerData
*
tdata
,
HeapTuple
otup
);
static
void
plpython_trigger_error_callback
(
void
*
arg
);
static
PyObject
*
PLy_procedure_call
(
PLyProcedure
*
proc
,
char
*
kargs
,
PyObject
*
vargs
);
static
void
PLy_abort_open_subtransactions
(
int
save_subxact_level
);
/* function subhandler */
...
...
src/pl/plpython/plpy_exec.h
View file @
f9de1e9a
...
...
@@ -7,7 +7,7 @@
#include "plpy_procedure.h"
extern
Datum
PLy_exec_function
(
FunctionCallInfo
,
PLyProcedure
*
);
extern
HeapTuple
PLy_exec_trigger
(
FunctionCallInfo
,
PLyProcedure
*
);
extern
Datum
PLy_exec_function
(
FunctionCallInfo
fcinfo
,
PLyProcedure
*
proc
);
extern
HeapTuple
PLy_exec_trigger
(
FunctionCallInfo
fcinfo
,
PLyProcedure
*
proc
);
#endif
/* PLPY_EXEC_H */
src/pl/plpython/plpy_main.c
View file @
f9de1e9a
...
...
@@ -61,9 +61,9 @@ PG_FUNCTION_INFO_V1(plpython2_inline_handler);
#endif
static
bool
PLy_procedure_is_trigger
(
Form_pg_proc
);
static
void
plpython_error_callback
(
void
*
);
static
void
plpython_inline_error_callback
(
void
*
);
static
bool
PLy_procedure_is_trigger
(
Form_pg_proc
procStruct
);
static
void
plpython_error_callback
(
void
*
arg
);
static
void
plpython_inline_error_callback
(
void
*
arg
);
static
void
PLy_init_interp
(
void
);
static
const
int
plpython_python_version
=
PY_MAJOR_VERSION
;
...
...
src/pl/plpython/plpy_planobject.c
View file @
f9de1e9a
...
...
@@ -13,8 +13,8 @@
#include "plpy_elog.h"
static
void
PLy_plan_dealloc
(
PyObject
*
);
static
PyObject
*
PLy_plan_status
(
PyObject
*
,
PyObject
*
);
static
void
PLy_plan_dealloc
(
PyObject
*
arg
);
static
PyObject
*
PLy_plan_status
(
PyObject
*
self
,
PyObject
*
args
);
static
char
PLy_plan_doc
[]
=
{
"Store a PostgreSQL plan"
...
...
src/pl/plpython/plpy_planobject.h
View file @
f9de1e9a
...
...
@@ -21,6 +21,6 @@ typedef struct PLyPlanObject
extern
void
PLy_plan_init_type
(
void
);
extern
PyObject
*
PLy_plan_new
(
void
);
extern
bool
is_PLyPlanObject
(
PyObject
*
);
extern
bool
is_PLyPlanObject
(
PyObject
*
ob
);
#endif
/* PLPY_PLANOBJECT_H */
src/pl/plpython/plpy_plpymodule.c
View file @
f9de1e9a
...
...
@@ -24,20 +24,20 @@
HTAB
*
PLy_spi_exceptions
=
NULL
;
static
void
PLy_add_exceptions
(
PyObject
*
);
static
void
PLy_generate_spi_exceptions
(
PyObject
*
,
PyObject
*
);
static
void
PLy_add_exceptions
(
PyObject
*
plpy
);
static
void
PLy_generate_spi_exceptions
(
PyObject
*
mod
,
PyObject
*
base
);
/* module functions */
static
PyObject
*
PLy_debug
(
PyObject
*
,
PyObject
*
);
static
PyObject
*
PLy_log
(
PyObject
*
,
PyObject
*
);
static
PyObject
*
PLy_info
(
PyObject
*
,
PyObject
*
);
static
PyObject
*
PLy_notice
(
PyObject
*
,
PyObject
*
);
static
PyObject
*
PLy_warning
(
PyObject
*
,
PyObject
*
);
static
PyObject
*
PLy_error
(
PyObject
*
,
PyObject
*
);
static
PyObject
*
PLy_fatal
(
PyObject
*
,
PyObject
*
);
static
PyObject
*
PLy_quote_literal
(
PyObject
*
,
PyObject
*
);
static
PyObject
*
PLy_quote_nullable
(
PyObject
*
,
PyObject
*
);
static
PyObject
*
PLy_quote_ident
(
PyObject
*
,
PyObject
*
);
static
PyObject
*
PLy_debug
(
PyObject
*
self
,
PyObject
*
args
);
static
PyObject
*
PLy_log
(
PyObject
*
self
,
PyObject
*
args
);
static
PyObject
*
PLy_info
(
PyObject
*
self
,
PyObject
*
args
);
static
PyObject
*
PLy_notice
(
PyObject
*
self
,
PyObject
*
args
);
static
PyObject
*
PLy_warning
(
PyObject
*
self
,
PyObject
*
args
);
static
PyObject
*
PLy_error
(
PyObject
*
self
,
PyObject
*
args
);
static
PyObject
*
PLy_fatal
(
PyObject
*
self
,
PyObject
*
args
);
static
PyObject
*
PLy_quote_literal
(
PyObject
*
self
,
PyObject
*
args
);
static
PyObject
*
PLy_quote_nullable
(
PyObject
*
self
,
PyObject
*
args
);
static
PyObject
*
PLy_quote_ident
(
PyObject
*
self
,
PyObject
*
args
);
/* A list of all known exceptions, generated from backend/utils/errcodes.txt */
...
...
src/pl/plpython/plpy_procedure.c
View file @
f9de1e9a
...
...
@@ -28,10 +28,10 @@ PLyProcedure *PLy_curr_procedure = NULL;
static
HTAB
*
PLy_procedure_cache
=
NULL
;
static
HTAB
*
PLy_trigger_cache
=
NULL
;
static
PLyProcedure
*
PLy_procedure_create
(
HeapTuple
,
Oid
,
bool
);
static
bool
PLy_procedure_argument_valid
(
PLyTypeInfo
*
);
static
bool
PLy_procedure_valid
(
PLyProcedure
*
,
HeapTuple
procTup
);
static
char
*
PLy_procedure_munge_source
(
const
char
*
,
const
char
*
);
static
PLyProcedure
*
PLy_procedure_create
(
HeapTuple
procTup
,
Oid
fn_oid
,
bool
is_trigger
);
static
bool
PLy_procedure_argument_valid
(
PLyTypeInfo
*
arg
);
static
bool
PLy_procedure_valid
(
PLyProcedure
*
proc
,
HeapTuple
procTup
);
static
char
*
PLy_procedure_munge_source
(
const
char
*
name
,
const
char
*
src
);
void
...
...
src/pl/plpython/plpy_procedure.h
View file @
f9de1e9a
...
...
@@ -40,10 +40,10 @@ typedef struct PLyProcedureEntry
}
PLyProcedureEntry
;
/* PLyProcedure manipulation */
extern
char
*
PLy_procedure_name
(
PLyProcedure
*
);
extern
PLyProcedure
*
PLy_procedure_get
(
Oid
,
bool
);
extern
void
PLy_procedure_compile
(
PLyProcedure
*
,
const
char
*
);
extern
void
PLy_procedure_delete
(
PLyProcedure
*
);
extern
char
*
PLy_procedure_name
(
PLyProcedure
*
proc
);
extern
PLyProcedure
*
PLy_procedure_get
(
Oid
fn_oid
,
bool
is_trigger
);
extern
void
PLy_procedure_compile
(
PLyProcedure
*
proc
,
const
char
*
src
);
extern
void
PLy_procedure_delete
(
PLyProcedure
*
proc
);
/* currently active plpython function */
...
...
src/pl/plpython/plpy_resultobject.c
View file @
f9de1e9a
...
...
@@ -11,14 +11,14 @@
#include "plpy_resultobject.h"
static
void
PLy_result_dealloc
(
PyObject
*
);
static
PyObject
*
PLy_result_nrows
(
PyObject
*
,
PyObject
*
);
static
PyObject
*
PLy_result_status
(
PyObject
*
,
PyObject
*
);
static
Py_ssize_t
PLy_result_length
(
PyObject
*
);
static
PyObject
*
PLy_result_item
(
PyObject
*
,
Py_ssize_t
);
static
PyObject
*
PLy_result_slice
(
PyObject
*
,
Py_ssize_t
,
Py_ssize_t
);
static
int
PLy_result_ass_item
(
PyObject
*
,
Py_ssize_t
,
PyObject
*
);
static
int
PLy_result_ass_slice
(
PyObject
*
,
Py_ssize_t
,
Py_ssize_t
,
PyObject
*
);
static
void
PLy_result_dealloc
(
PyObject
*
arg
);
static
PyObject
*
PLy_result_nrows
(
PyObject
*
self
,
PyObject
*
args
);
static
PyObject
*
PLy_result_status
(
PyObject
*
self
,
PyObject
*
args
);
static
Py_ssize_t
PLy_result_length
(
PyObject
*
arg
);
static
PyObject
*
PLy_result_item
(
PyObject
*
arg
,
Py_ssize_t
idx
);
static
PyObject
*
PLy_result_slice
(
PyObject
*
arg
,
Py_ssize_t
lidx
,
Py_ssize_t
hidx
);
static
int
PLy_result_ass_item
(
PyObject
*
arg
,
Py_ssize_t
idx
,
PyObject
*
item
);
static
int
PLy_result_ass_slice
(
PyObject
*
rg
,
Py_ssize_t
lidx
,
Py_ssize_t
hidx
,
PyObject
*
slice
);
static
char
PLy_result_doc
[]
=
{
"Results of a PostgreSQL query"
...
...
src/pl/plpython/plpy_spi.c
View file @
f9de1e9a
...
...
@@ -24,10 +24,10 @@
#include "plpy_resultobject.h"
static
PyObject
*
PLy_spi_execute_query
(
char
*
,
long
);
static
PyObject
*
PLy_spi_execute_plan
(
PyObject
*
,
PyObject
*
,
long
);
static
PyObject
*
PLy_spi_execute_fetch_result
(
SPITupleTable
*
,
int
,
int
);
static
void
PLy_spi_exception_set
(
PyObject
*
,
ErrorData
*
);
static
PyObject
*
PLy_spi_execute_query
(
char
*
query
,
long
limit
);
static
PyObject
*
PLy_spi_execute_plan
(
PyObject
*
ob
,
PyObject
*
list
,
long
limit
);
static
PyObject
*
PLy_spi_execute_fetch_result
(
SPITupleTable
*
tuptable
,
int
rows
,
int
status
);
static
void
PLy_spi_exception_set
(
PyObject
*
excclass
,
ErrorData
*
edata
);
/* prepare(query="select * from foo")
...
...
src/pl/plpython/plpy_spi.h
View file @
f9de1e9a
...
...
@@ -8,8 +8,8 @@
#include "utils/palloc.h"
#include "utils/resowner.h"
extern
PyObject
*
PLy_spi_prepare
(
PyObject
*
,
PyObject
*
);
extern
PyObject
*
PLy_spi_execute
(
PyObject
*
,
PyObject
*
);
extern
PyObject
*
PLy_spi_prepare
(
PyObject
*
self
,
PyObject
*
args
);
extern
PyObject
*
PLy_spi_execute
(
PyObject
*
self
,
PyObject
*
args
);
typedef
struct
PLyExceptionEntry
{
...
...
src/pl/plpython/plpy_subxactobject.c
View file @
f9de1e9a
...
...
@@ -19,9 +19,9 @@
List
*
explicit_subtransactions
=
NIL
;
static
void
PLy_subtransaction_dealloc
(
PyObject
*
);
static
PyObject
*
PLy_subtransaction_enter
(
PyObject
*
,
PyObject
*
);
static
PyObject
*
PLy_subtransaction_exit
(
PyObject
*
,
PyObject
*
);
static
void
PLy_subtransaction_dealloc
(
PyObject
*
subxact
);
static
PyObject
*
PLy_subtransaction_enter
(
PyObject
*
self
,
PyObject
*
unused
);
static
PyObject
*
PLy_subtransaction_exit
(
PyObject
*
self
,
PyObject
*
args
);
static
char
PLy_subtransaction_doc
[]
=
{
"PostgreSQL subtransaction context manager"
...
...
src/pl/plpython/plpy_subxactobject.h
View file @
f9de1e9a
...
...
@@ -24,6 +24,6 @@ typedef struct PLySubtransactionData
}
PLySubtransactionData
;
extern
void
PLy_subtransaction_init_type
(
void
);
extern
PyObject
*
PLy_subtransaction_new
(
PyObject
*
,
PyObject
*
);
extern
PyObject
*
PLy_subtransaction_new
(
PyObject
*
self
,
PyObject
*
unused
);
#endif
/* PLPY_SUBXACTOBJECT */
src/pl/plpython/plpy_typeio.c
View file @
f9de1e9a
...
...
@@ -26,35 +26,35 @@
/* I/O function caching */
static
void
PLy_input_datum_func2
(
PLyDatumToOb
*
,
Oid
,
HeapTuple
);
static
void
PLy_output_datum_func2
(
PLyObToDatum
*
,
HeapTuple
);
static
void
PLy_input_datum_func2
(
PLyDatumToOb
*
arg
,
Oid
typeOid
,
HeapTuple
typeTup
);
static
void
PLy_output_datum_func2
(
PLyObToDatum
*
arg
,
HeapTuple
typeTup
);
/* conversion from Datums to Python objects */
static
PyObject
*
PLyBool_FromBool
(
PLyDatumToOb
*
,
Datum
);
static
PyObject
*
PLyFloat_FromFloat4
(
PLyDatumToOb
*
,
Datum
);
static
PyObject
*
PLyFloat_FromFloat8
(
PLyDatumToOb
*
,
Datum
);
static
PyObject
*
PLyFloat_FromNumeric
(
PLyDatumToOb
*
,
Datum
);
static
PyObject
*
PLyInt_FromInt16
(
PLyDatumToOb
*
,
Datum
);
static
PyObject
*
PLyInt_FromInt32
(
PLyDatumToOb
*
,
Datum
);
static
PyObject
*
PLyLong_FromInt64
(
PLyDatumToOb
*
,
Datum
);
static
PyObject
*
PLyBytes_FromBytea
(
PLyDatumToOb
*
,
Datum
);
static
PyObject
*
PLyString_FromDatum
(
PLyDatumToOb
*
,
Datum
);
static
PyObject
*
PLyList_FromArray
(
PLyDatumToOb
*
,
Datum
);
static
PyObject
*
PLyBool_FromBool
(
PLyDatumToOb
*
arg
,
Datum
d
);
static
PyObject
*
PLyFloat_FromFloat4
(
PLyDatumToOb
*
arg
,
Datum
d
);
static
PyObject
*
PLyFloat_FromFloat8
(
PLyDatumToOb
*
arg
,
Datum
d
);
static
PyObject
*
PLyFloat_FromNumeric
(
PLyDatumToOb
*
arg
,
Datum
d
);
static
PyObject
*
PLyInt_FromInt16
(
PLyDatumToOb
*
arg
,
Datum
d
);
static
PyObject
*
PLyInt_FromInt32
(
PLyDatumToOb
*
arg
,
Datum
d
);
static
PyObject
*
PLyLong_FromInt64
(
PLyDatumToOb
*
arg
,
Datum
d
);
static
PyObject
*
PLyBytes_FromBytea
(
PLyDatumToOb
*
arg
,
Datum
d
);
static
PyObject
*
PLyString_FromDatum
(
PLyDatumToOb
*
arg
,
Datum
d
);
static
PyObject
*
PLyList_FromArray
(
PLyDatumToOb
*
arg
,
Datum
d
);
/* conversion from Python objects to Datums */
static
Datum
PLyObject_ToBool
(
PLyObToDatum
*
,
int32
,
PyObject
*
);
static
Datum
PLyObject_ToBytea
(
PLyObToDatum
*
,
int32
,
PyObject
*
);
static
Datum
PLyObject_ToComposite
(
PLyObToDatum
*
,
int32
,
PyObject
*
);
static
Datum
PLyObject_ToDatum
(
PLyObToDatum
*
,
int32
,
PyObject
*
);
static
Datum
PLySequence_ToArray
(
PLyObToDatum
*
,
int32
,
PyObject
*
);
static
Datum
PLyObject_ToBool
(
PLyObToDatum
*
arg
,
int32
typmod
,
PyObject
*
plrv
);
static
Datum
PLyObject_ToBytea
(
PLyObToDatum
*
arg
,
int32
typmod
,
PyObject
*
plrv
);
static
Datum
PLyObject_ToComposite
(
PLyObToDatum
*
arg
,
int32
typmod
,
PyObject
*
plrv
);
static
Datum
PLyObject_ToDatum
(
PLyObToDatum
*
arg
,
int32
typmod
,
PyObject
*
plrv
);
static
Datum
PLySequence_ToArray
(
PLyObToDatum
*
arg
,
int32
typmod
,
PyObject
*
plrv
);
/* conversion from Python objects to heap tuples (used by triggers and SRFs) */
static
HeapTuple
PLyMapping_ToTuple
(
PLyTypeInfo
*
,
TupleDesc
,
PyObject
*
);
static
HeapTuple
PLySequence_ToTuple
(
PLyTypeInfo
*
,
TupleDesc
,
PyObject
*
);
static
HeapTuple
PLyGenericObject_ToTuple
(
PLyTypeInfo
*
,
TupleDesc
,
PyObject
*
);
static
HeapTuple
PLyMapping_ToTuple
(
PLyTypeInfo
*
info
,
TupleDesc
desc
,
PyObject
*
mapping
);
static
HeapTuple
PLySequence_ToTuple
(
PLyTypeInfo
*
info
,
TupleDesc
desc
,
PyObject
*
sequence
);
static
HeapTuple
PLyGenericObject_ToTuple
(
PLyTypeInfo
*
info
,
TupleDesc
desc
,
PyObject
*
object
);
/* make allocations in the TopMemoryContext */
static
void
perm_fmgr_info
(
Oid
,
FmgrInfo
*
);
static
void
perm_fmgr_info
(
Oid
functionId
,
FmgrInfo
*
finfo
);
void
PLy_typeinfo_init
(
PLyTypeInfo
*
arg
)
...
...
src/pl/plpython/plpy_typeio.h
View file @
f9de1e9a
...
...
@@ -87,21 +87,21 @@ typedef struct PLyTypeInfo
ItemPointerData
typrel_tid
;
}
PLyTypeInfo
;
extern
void
PLy_typeinfo_init
(
PLyTypeInfo
*
);
extern
void
PLy_typeinfo_dealloc
(
PLyTypeInfo
*
);
extern
void
PLy_typeinfo_init
(
PLyTypeInfo
*
arg
);
extern
void
PLy_typeinfo_dealloc
(
PLyTypeInfo
*
arg
);
extern
void
PLy_input_datum_func
(
PLyTypeInfo
*
,
Oid
,
HeapTuple
);
extern
void
PLy_output_datum_func
(
PLyTypeInfo
*
,
HeapTuple
);
extern
void
PLy_input_datum_func
(
PLyTypeInfo
*
arg
,
Oid
typeOid
,
HeapTuple
typeTup
);
extern
void
PLy_output_datum_func
(
PLyTypeInfo
*
arg
,
HeapTuple
typeTup
);
extern
void
PLy_input_tuple_funcs
(
PLyTypeInfo
*
,
TupleD
esc
);
extern
void
PLy_output_tuple_funcs
(
PLyTypeInfo
*
,
TupleD
esc
);
extern
void
PLy_input_tuple_funcs
(
PLyTypeInfo
*
arg
,
TupleDesc
d
esc
);
extern
void
PLy_output_tuple_funcs
(
PLyTypeInfo
*
arg
,
TupleDesc
d
esc
);
extern
void
PLy_output_record_funcs
(
PLyTypeInfo
*
,
TupleD
esc
);
extern
void
PLy_output_record_funcs
(
PLyTypeInfo
*
arg
,
TupleDesc
d
esc
);
/* conversion from Python objects to heap tuples */
extern
HeapTuple
PLyObject_ToTuple
(
PLyTypeInfo
*
,
TupleDesc
,
PyObject
*
);
extern
HeapTuple
PLyObject_ToTuple
(
PLyTypeInfo
*
info
,
TupleDesc
desc
,
PyObject
*
plrv
);
/* conversion from heap tuples to Python dictionaries */
extern
PyObject
*
PLyDict_FromTuple
(
PLyTypeInfo
*
,
HeapTuple
,
TupleD
esc
);
extern
PyObject
*
PLyDict_FromTuple
(
PLyTypeInfo
*
info
,
HeapTuple
tuple
,
TupleDesc
d
esc
);
#endif
/* PLPY_TYPEIO_H */
src/pl/plpython/plpy_util.h
View file @
f9de1e9a
...
...
@@ -6,10 +6,10 @@
#ifndef PLPY_UTIL_H
#define PLPY_UTIL_H
extern
void
*
PLy_malloc
(
size_t
);
extern
void
*
PLy_malloc0
(
size_t
);
extern
char
*
PLy_strdup
(
const
char
*
);
extern
void
PLy_free
(
void
*
);
extern
void
*
PLy_malloc
(
size_t
bytes
);
extern
void
*
PLy_malloc0
(
size_t
bytes
);
extern
char
*
PLy_strdup
(
const
char
*
str
);
extern
void
PLy_free
(
void
*
ptr
);
extern
PyObject
*
PLyUnicode_Bytes
(
PyObject
*
unicode
);
extern
char
*
PLyUnicode_AsString
(
PyObject
*
unicode
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment