diff options
| author | Federico Di Gregorio <fog@initd.org> | 2006-06-11 03:40:16 +0000 |
|---|---|---|
| committer | Federico Di Gregorio <fog@initd.org> | 2006-06-11 03:40:16 +0000 |
| commit | a9045916f2dee0cb994be7c4e50b458a80a66bba (patch) | |
| tree | 6e5a7c04b67672a5accd2ea427f226e51629aaa6 | |
| parent | 9577f4e2a64c64d3146f4d2d85ad53cecfd01a41 (diff) | |
| download | psycopg2-a9045916f2dee0cb994be7c4e50b458a80a66bba.tar.gz | |
Fixed list adaptation.
| -rw-r--r-- | ChangeLog | 3 | ||||
| -rw-r--r-- | psycopg/adapter_list.c | 2 |
2 files changed, 4 insertions, 1 deletions
@@ -1,5 +1,8 @@ 2006-06-11 Federico Di Gregorio <fog@initd.org> + * Applied patch to adapt an empty list into an empty array + and not to NULL (from iGGy, closes: #108). + * Applied patch from wkv to avoid under-allocating query space when the parameters are not of the right type (Closes: #110). diff --git a/psycopg/adapter_list.c b/psycopg/adapter_list.c index d03626d..d29512f 100644 --- a/psycopg/adapter_list.c +++ b/psycopg/adapter_list.c @@ -46,7 +46,7 @@ list_quote(listObject *self) /* empty arrays are converted to NULLs (still searching for a way to insert an empty array in postgresql */ - if (len == 0) return PyString_FromString("NULL"); + if (len == 0) return PyString_FromString("{}"); tmp = PyTuple_New(len); |
