libpq and libpgtcl in Windows
Hi all
I made dll's(libpq.dll,libpgtcl.dll) only for pgaccess.
It is a temporary solution for quick fix and the solution for general use
is necessary.
I made libpgtcl.dll ignoring NOTIFY functionality(not used in pgaccess).
Sorry,I'm not a Tcl expert and can't provide proper code for NOTIFY
functionality in Windows.
Another problem exists between libpq and libpgtcl in Windows.
Libpgtcl references global data pgresStatus[] in libpq when using
pg_result -status command.
But in Windows libpgtcl doesn't reference pgresStatus[] in the same
way as UNIX and pg_result -status returns improper values.
Any ideas ?
In my temporary solution for pgaccess,I used a function interface
between libpq and libpgtcl instead of global data.
Thanks
Hiroshi Inoue
Inoue@tpf.co.jp
Hiroshi,
I've got a bug report for you. On a Win95 machine running
Tcl/Tk 8.1, the dll does not load correctly. A "load libpgtcl.dll"
at the "wish81" console gives a :
<Couldn't load file "libpgtcl.dll": invalid argument>.
But it works file on Tcl/Tk 8.0 for Windows. Apparently the DLL
interface in Tcl/Tk 8.1 is a little different, I'm not sure what
it is. Are you using Microsoft Visual C++ or a Borland Compiler?
The DLLs that Borland puts out are a little different but for the
most part I have'nt to many problems with them. The Tcl that
Scriptics puts out is compiled in Microsoft Visual C++.
I'll look at your code this weekend.
D.
-----Original Message-----
From: Hiroshi Inoue [mailto:Inoue@tpf.co.jp]
Sent: Thursday, December 10, 1998 9:23 PM
To: pgsql-hackers; pgsql-interfaces@postgreSQL.org
Subject: [HACKERS] libpq and libpgtcl in Windows
Hi all
I made dll's(libpq.dll,libpgtcl.dll) only for pgaccess.
It is a temporary solution for quick fix and the solution for general
use
is necessary.
I made libpgtcl.dll ignoring NOTIFY functionality(not used in pgaccess).
Sorry,I'm not a Tcl expert and can't provide proper code for NOTIFY
functionality in Windows.
Another problem exists between libpq and libpgtcl in Windows.
Libpgtcl references global data pgresStatus[] in libpq when using
pg_result -status command.
But in Windows libpgtcl doesn't reference pgresStatus[] in the same
way as UNIX and pg_result -status returns improper values.
Any ideas ?
In my temporary solution for pgaccess,I used a function interface
between libpq and libpgtcl instead of global data.
Thanks
Hiroshi Inoue
Inoue@tpf.co.jp
Import Notes
Resolved by subject fallback
Hi all
-----Original Message-----
From: Dan Gowin [mailto:DGowin@avantec.net]
Sent: Friday, December 11, 1998 11:17 PM
To: 'Hiroshi Inoue'; PGSQL HACKERS (E-mail);
'pgsql-interfaces@postgreSQL.org'
Subject: RE: [HACKERS] libpq and libpgtcl in WindowsHiroshi,
I've got a bug report for you. On a Win95 machine running
Tcl/Tk 8.1, the dll does not load correctly. A "load libpgtcl.dll"
at the "wish81" console gives a :
<Couldn't load file "libpgtcl.dll": invalid argument>.
But it works file on Tcl/Tk 8.0 for Windows. Apparently the DLL
interface in Tcl/Tk 8.1 is a little different, I'm not sure what
it is.
If the version of Tcl is different,the name is different(tcl76.dll,
tcl80.dll,tcl81.dll etc).
The dll I provided is only for Tcl8.0(tcl80.dll).
For Tcl8.1 another dll is necessary.
The dll for Tcl8.1 is necessary ?
Are you using Microsoft Visual C++ or a Borland Compiler?
The DLLs that Borland puts out are a little different but for the
most part I have'nt to many problems with them. The Tcl that
Scriptics puts out is compiled in Microsoft Visual C++.I'll look at your code this weekend.
D.
Thanks
Hiroshi Inoue
Inoue@tpf.co.jp
Hiroshi Inoue wrote:
If the version of Tcl is different,the name is different(tcl76.dll,
tcl80.dll,tcl81.dll etc).
The dll I provided is only for Tcl8.0(tcl80.dll).
For Tcl8.1 another dll is necessary.
The dll for Tcl8.1 is necessary ?
Tcl/Tk 8.1 is currently in beta stage, but a lot of programmers choose
to "taste" the new flavor of Tcl/Tk 8.1
If it's not so hard, maybe it would be better to deliver DLL for all
currently available versions.
Best regards,
--
Constantin Teodorescu
FLEX Consulting Braila, ROMANIA
Hi all.
I have changed the subject from "libpq and libpgtcl in Windows".
My main point is
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 ?
Thanks
Hiroshi Inoue
Inoue@tpf.co.jp
PS.
I accepted a lot of mails about libpq and libpgtcl.
Seems many people thought I am good at libpq,Tcl etc.
But my work is only the compilation of libpq and libpgtcl.
LIBPQ for WIN32 is the work of Magnus Hagander.
I changed libpgtcl and libpq just a little for pgaccess.
The dll's I provieded are only for pgaccess not for general use.
Hello all.
-----Original Message-----
From: owner-pgsql-interfaces@postgreSQL.org
[mailto:owner-pgsql-interfaces@postgreSQL.org]On Behalf Of Hiroshi Inoue
Subject: [INTERFACES] The problem between libpq and libpgtcl for WIN32The 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@interwiz.koganei.tokyo.jp