Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit076026b

Browse files
committed
Python handle as string all int8 values from postgresql. This could be
view when using the aggregate function count() and function nextvalthat returns an int8 value, but in python is represented like string:>> db.query("select nextval('my_seq')").getresult()[('2',)]>> db.query("select count(*) from films").dictresult()[{'count': '120'}]Ricardo Caesar Lenzi
1 parentcfe0179 commit076026b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎src/interfaces/python/pgmodule.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ get_type_array(PGresult *result, int nfields)
286286
{
287287
caseINT2OID:
288288
caseINT4OID:
289+
caseINT8OID:
289290
caseOIDOID:
290291
typ[j]=1;
291292
break;
@@ -1793,6 +1794,7 @@ pgquery_getresult(pgqueryobject * self, PyObject * args)
17931794
{
17941795
caseINT2OID:
17951796
caseINT4OID:
1797+
caseINT8OID:
17961798
caseOIDOID:
17971799
typ[j]=1;
17981800
break;
@@ -1940,6 +1942,7 @@ pgquery_dictresult(pgqueryobject * self, PyObject * args)
19401942
{
19411943
caseINT2OID:
19421944
caseINT4OID:
1945+
caseINT8OID:
19431946
caseOIDOID:
19441947
typ[j]=1;
19451948
break;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp