diff options
author | D'Arcy J.M. Cain <darcy@druid.net> | 2001-05-27 08:24:52 +0000 |
---|---|---|
committer | D'Arcy J.M. Cain <darcy@druid.net> | 2001-05-27 08:24:52 +0000 |
commit | 52350c7ad965d856da74514f89b88ce4ffbd18e7 (patch) | |
tree | d9c58d21a0fd5dc22bb0a7a7aa9cebca9394d4b1 /src/interfaces/python/pgmodule.c | |
parent | 97c7db2e15f8d87f0a26fb46b8b22411f722c456 (diff) | |
download | postgresql-52350c7ad965d856da74514f89b88ce4ffbd18e7.tar.gz postgresql-52350c7ad965d856da74514f89b88ce4ffbd18e7.zip |
Add NUMERICOID return type. Treat it as floating point for now. This
could be changed if we create a new Python type that matches it better
but NUMERIC <==> FLOAT probably works fine for most cases.
Diffstat (limited to 'src/interfaces/python/pgmodule.c')
-rw-r--r-- | src/interfaces/python/pgmodule.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/interfaces/python/pgmodule.c b/src/interfaces/python/pgmodule.c index 9cfcd40e530..71ed7569f9b 100644 --- a/src/interfaces/python/pgmodule.c +++ b/src/interfaces/python/pgmodule.c @@ -43,6 +43,7 @@ #define FLOAT4OID 700 #define FLOAT8OID 701 #define CASHOID 790 +#define NUMERICOID 1700 static PyObject *PGError; static const char *PyPgVersion = "3.1"; @@ -298,6 +299,7 @@ get_type_array(PGresult *result, int nfields) case FLOAT4OID: case FLOAT8OID: + case NUMERICOID: typ[j] = 2; break; @@ -1805,6 +1807,7 @@ pgquery_getresult(pgqueryobject * self, PyObject * args) case FLOAT4OID: case FLOAT8OID: + case NUMERICOID: typ[j] = 2; break; @@ -1940,6 +1943,7 @@ pgquery_dictresult(pgqueryobject * self, PyObject * args) case FLOAT4OID: case FLOAT8OID: + case NUMERICOID: typ[j] = 2; break; |