** Also affects: postgresql-9.1 (Ubuntu Precise)
   Importance: Undecided
       Status: New

** Also affects: postgresql-9.1 (Ubuntu Quantal)
   Importance: Undecided
       Status: New

** Also affects: postgresql-9.1 (Ubuntu Raring)
   Importance: Undecided
       Status: New

** Description changed:

  I found a bug in libecpg.so.6.3, which according to Michael Meskes was
  introduced in the postgresql 9.0 source tree.
  
  I have included a test application which works fine on Postgresql 8.4
  (libecpg.so.6.1), but fails using Postgresql 9.1 (libecpg.so.6.3).
  
  After confirming the bug with Michael, he came up with this patch. Can
  it be added to the Ubuntu package sources please?...
  
- commit 4f6469e55c8bf8b015fe571313c5922a869b4636
- Author: Michael Meskes <mes...@debian.org>
- Date:   Fri Oct 5 16:37:45 2012 +0200
- 
-     Fixed test for array boundary.
-     
-     Instead of continuing if the next character is not an array boundary 
get_data()
-     used to continue only on finding a boundary so it was not able to read any
-     element after the first.
- 
- diff --git a/src/interfaces/ecpg/ecpglib/data.c 
b/src/interfaces/ecpg/ecpglib/data.c
- index db97503..dcccd92 100644
- --- a/src/interfaces/ecpg/ecpglib/data.c
- +++ b/src/interfaces/ecpg/ecpglib/data.c
- @@ -422,6 +422,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int 
act_field, int lineno,
-                                                       ecpg_raise(lineno, 
ECPG_CONVERT_BOOL,
-                                                                          
ECPG_SQLSTATE_DATATYPE_MISMATCH,
-                                                                          
NULL);
- +                                             pval++;
-                                               break;
-                                       }
-                                       else if (pval[0] == 't' && pval[1] == 
'\0')
- @@ -434,6 +435,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int 
act_field, int lineno,
-                                                       ecpg_raise(lineno, 
ECPG_CONVERT_BOOL,
-                                                                          
ECPG_SQLSTATE_DATATYPE_MISMATCH,
-                                                                          
NULL);
- +                                             pval++;
-                                               break;
-                                       }
-                                       else if (pval[0] == '\0' && 
PQgetisnull(results, act_tuple, act_field))
- @@ -777,7 +779,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int 
act_field, int lineno,
-                                       ++pval;
-                       }
-               }
- -     } while (*pval != '\0' && array_boundary(isarray, *pval));
- +     } while (*pval != '\0' && !array_boundary(isarray, *pval));
-  
-       return (true);
-  }
+ Upstream fix:
+ 
http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=6e41fa2e5cd84d0970f1ee1d9c9767dbc974952a

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to postgresql-9.1 in Ubuntu.
https://bugs.launchpad.net/bugs/1063613

Title:
  array type handling bug in libecpg.so.6.3, confirmed, patch attached

Status in “postgresql-9.1” package in Ubuntu:
  New
Status in “postgresql-9.1” source package in Precise:
  New
Status in “postgresql-9.1” source package in Quantal:
  New
Status in “postgresql-9.1” source package in Raring:
  Fix Committed

Bug description:
  I found a bug in libecpg.so.6.3, which according to Michael Meskes was
  introduced in the postgresql 9.0 source tree.

  I have included a test application which works fine on Postgresql 8.4
  (libecpg.so.6.1), but fails using Postgresql 9.1 (libecpg.so.6.3).

  After confirming the bug with Michael, he came up with this patch. Can
  it be added to the Ubuntu package sources please?...

  Upstream fix:
  
http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=6e41fa2e5cd84d0970f1ee1d9c9767dbc974952a

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/postgresql-9.1/+bug/1063613/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to