Skip site navigation (1) Skip section navigation (2)

RE: [INTERFACES] The problem between libpq and libpgtcl for WIN32

From: "Hiroki Kataoka" <kataoka(at)interwiz(dot)koganei(dot)tokyo(dot)jp>
To: <pgsql-interfaces(at)postgresql(dot)org>
Subject: RE: [INTERFACES] The problem between libpq and libpgtcl for WIN32
Date: 1998-12-16 12:27:47
Message-ID: 000901be28ef$7d3d0b80$44c9e6ca@suzume.interwiz.koganei.tokyo.jp (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-interfaces
Hello all.

> -----Original Message-----
> From: owner-pgsql-interfaces(at)postgreSQL(dot)org
> [mailto:owner-pgsql-interfaces(at)postgreSQL(dot)org]On Behalf Of Hiroshi Inoue
> Subject: [INTERFACES] The problem between libpq and libpgtcl for WIN32
>
>
>   The treatment of pgresStatus[] in libpq must be changed ?
>
> In case of Windows,global data interface between dll's is
> different from UNIX.
> If fact,libpgtcl references global data pgresStatus[] in libpq
> and  pg_result -status command does not work properly for
> Windows.
>
> I think it is preferable to use function interfaces than gobal
> data references.
>
> Any ideas ?

  I solved this problem by the change in the following.

======== cut here ========
*** libpq-fe.h.dist     Tue Oct  6 23:16:48 1998
--- libpq-fe.h  Tue Dec 15 03:52:34 1998
***************
*** 50,56 ****
--- 50,60 ----
        } ExecStatusType;

  /* String descriptions of the ExecStatusTypes */
+ #ifdef WIN32
+       __declspec(dllimport) const char * const pgresStatus[];
+ #else
        extern const char * const pgresStatus[];
+ #endif

  /* PGconn encapsulates a connection to the backend.
   * The contents of this struct are not supposed to be known to
applications.
*** libpqdll.def.dist   Tue Oct  6 23:05:02 1998
--- libpqdll.def        Tue Dec 15 03:52:44 1998
***************
*** 63,68 ****
        lo_unlink               @ 60
        lo_import               @ 61
        lo_export               @ 62
!       pgresStatus             @ 63
        PQmblen                 @ 64
        PQresultErrorMessage    @ 65
--- 63,68 ----
        lo_unlink               @ 60
        lo_import               @ 61
        lo_export               @ 62
!       pgresStatus             @ 63 DATA
        PQmblen                 @ 64
        PQresultErrorMessage    @ 65
======== cut here ========

  "pg_result -status" operates correctly by this method. Moreover, it is
thought that this method is easy because the change part is in libpq.

--
Hiroki Kataoka
kataoka(at)interwiz(dot)koganei(dot)tokyo(dot)jp


In response to

pgsql-hackers by date

Next:From: Vadim MikheevDate: 1998-12-16 13:00:54
Subject: MVCC works in serialized mode!
Previous:From: Vadim MikheevDate: 1998-12-16 11:00:56
Subject: CURRENT: crash in select_view regression test...

pgsql-interfaces by date

Next:From: Daniel LoneanuDate: 1998-12-16 19:12:29
Subject: Hi
Previous:From: Tom LaneDate: 1998-12-15 01:25:03
Subject: Re: [INTERFACES] The problem between libpq and libpgtcl for WIN32

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group