OK, can you suggest a patch?

---------------------------------------------------------------------------

[EMAIL PROTECTED] wrote:
> Ragnar Kjørstad ([EMAIL PROTECTED]) reports a bug with a severity of 3
> The lower the number the more severe it is.
> 
> Short Description
> python interface doesn't handle int8 correctly.
> 
> Long Description
> This applies to postgresql 7.2.1 on linux x86 (32 bit)
> 
> getresult() and dictresult() return int4 data in a python int object, but it should 
>use a python long object, or it will overflow.
> 
> >From postgresql-7.2.1/src/interfaces/python:pgquery_dictresult  :
> switch (PQftype(self->last_result, j)) {  
>   case INT2OID:  
>   case INT4OID:
>   case INT8OID:
>   case OIDOID:
>      typ[j] = 1;
>      break;
> }
> ...
> switch (typ[j]) {
>   case 1:
>     val = PyInt_FromLong(strtol(s, NULL, 10));
>     break;
> }
> 
> 
> clearly this is wrong....
> 
> 
> Sample Code
> 
> 
> No file was uploaded with this report
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to [EMAIL PROTECTED] so that your
> message can get through to the mailing list cleanly
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [EMAIL PROTECTED]               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly


Reply via email to