Re: libECPG: Warning: get descriptor: 7.1 and 7.2 arenot - Mailing list pgsql-interfaces

From Christof Petig
Subject Re: libECPG: Warning: get descriptor: 7.1 and 7.2 arenot
Date
Msg-id 3BC14A33.B251D9AE@petig-baender.de
Whole thread Raw
In response to Re: libECPG: Warning: get descriptor: 7.1 and 7.2 are  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: libECPG: Warning: get descriptor: 7.1 and 7.2 arenot binary compatible (yet)  (Michael Meskes <meskes@postgresql.org>)
Re: libECPG: Warning: get descriptor: 7.1 and 7.2 arenot  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-interfaces
Peter Eisentraut wrote:

> Christof Petig writes:
>
> > I just noticed that libecpg.so.3.2.0 and libecpg.so.3.3.0 are not binary
> > compatible.
> > A program using get descriptor stopped working (still under
> > investigation) once I installed the new libecpg.
>
> I seem to remember that some enums were rearranged or renumbered.  Look
> there.

You guessed right. I think I found the problem ...

@@ -67,10 +68,11 @@               ECPGd_ret_octet,               ECPGd_scale,               ECPGd_type,
+               ECPGd_cardinality,               ECPGd_EODT                              /* End of descriptor
typ
es. */       };


IIRC the list of descriptor types is terminated by ECPGd_EODT. So the new
library can't figure out where the old code's argument stop.

Fix: put ECPGd_cardinality behind ECPGd_EODT.
I reordered them because of logical considerations, maybe we should weight
binary compatibility more than beautiful-sortedness of enum values.

Michael: Would you swap the lines?

Thanks   Christof




pgsql-interfaces by date:

Previous
From: lbayuk@mindspring.com (ljb)
Date:
Subject: Re: Trouble linking with libpq
Next
From: Michael Meskes
Date:
Subject: Re: libECPG: Warning: get descriptor: 7.1 and 7.2 arenot binary compatible (yet)