projects
/
users
/
simon
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b563a8e
)
Domain support in PL/Python
author
Peter Eisentraut
<peter_e@gmx.net>
Fri, 14 Aug 2009 13:12:21 +0000
(13:12 +0000)
committer
Peter Eisentraut
<peter_e@gmx.net>
Fri, 14 Aug 2009 13:12:21 +0000
(13:12 +0000)
When examining what Python type to convert a PostgreSQL type to on input,
look at the base type of the input type, otherwise all domains end up
defaulting to string.
src/pl/plpython/plpython.c
patch
|
blob
|
blame
|
history
diff --git
a/src/pl/plpython/plpython.c
b/src/pl/plpython/plpython.c
index 07da41b01c41668a474d7dc021d592a7410c359d..cfc22259b895c4a1db4ed1717f52b209771db723 100644
(file)
--- a/
src/pl/plpython/plpython.c
+++ b/
src/pl/plpython/plpython.c
@@
-1641,7
+1641,7
@@
PLy_input_datum_func2(PLyDatumToOb *arg, Oid typeOid, HeapTuple typeTup)
arg->typbyval = typeStruct->typbyval;
/* Determine which kind of Python object we will convert to */
- switch (
typeOid
)
+ switch (
getBaseType(typeOid)
)
{
case BOOLOID:
arg->func = PLyBool_FromString;