Thread: Re: PostgreSQL for WinNT

Re: PostgreSQL for WinNT

From
Jason Tishler
Date:
Kevin,

On Wed, Apr 11, 2001 at 09:38:37PM -0400, Kevin McLaughlin wrote:
> Can you say if the version you have loaded in the cygwin download allows ODBC
> access from Windows PCs.

I'm sure that it doesn't.

> Do you have to use the configure option --with-odbc for odbc to work,

The above sounds reasonable, but I have never tried it.

> and if so have you tried this with the files you included in the cygwin
> download.

No, as the announcement and README clearly stated, I configured as
follows:

    $ configure --with-CXX --prefix=/usr --sysconfdir=/etc --docdir=/usr/doc/postgresql-7.1rc4

Jason

--
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

Re: PostgreSQL for WinNT

From
Jason Tishler
Date:
Fred,

On Thu, Apr 12, 2001 at 05:00:26PM -0500, Fred Yankowski wrote:
> This is in response to a note you sent to one of the Postgres lists.

I *knew* that I was going to get myself into trouble by responding with
more than "I dunno"...

I hope that you don't mind but I'm CC-ing pgsql-ports so others can
benefit from this too.

> On Thu, Apr 12, 2001 at 05:00:46PM -0400, Jason Tishler wrote:
> > On Wed, Apr 11, 2001 at 09:38:37PM -0400, Kevin McLaughlin wrote:
> > > Can you say if the version you have loaded in the cygwin download
> > > allows ODBC access from Windows PCs.
> >
> > I'm sure that it doesn't.
>
> Well, the distribution by itself doesn't provide ODBC access, but if
> one separately obtains and installs the psqlodbc.dll file then ODBC
> access should work.  I haven't tried this with your distribution, but
> it works when I build postgres from source using only the '--with-CXX'
> config option.

I just did the following (with 7.1rc4):

    $ cd src/interfaces/odbc
    $ make

The above produced psqlodbc.dll which seems to be exporting the "right
stuff."  How do I test this -- I have never used ODBC before.

> I find ODBC access to be critical to my use of PostgreSQL on NT.
> Perhaps we can find some way to include psqlodbc.dll in the
> distribution.

I'm quite willing to include ODBC support in my distribution.  However I
will only include a Cygwin psqlodbc.dll -- including a straight Win32 one
is confusing and could cause some problems.  There are too many Cygwin
to non-Cygwin interaction problems on the Cygwin mailing list already...

> > > Do you have to use the configure option --with-odbc for odbc to work,
> >
> > The above sounds reasonable, but I have never tried it.
>
> That did _not_ work when I tried it a month or so ago.  Hiroshi Inoue
> steered me to the readme.txt in src/interfaces/odbc.  By following
> those steps, which involve using MS VC++, I was able to build the DLL
> myself.  It turned out that having tried building with --with-odbc
> prior to that had actually left things in a bad state in the
> interfaces/odbc folder and it was necessary to do a distclean before
> building the DLL.

I just did the following (with 7.1rc4):

    $ cd src/interfaces/odbc
    $ nmake -f win32.mak

The above produced Win32 psqlodbc.dll and seems to be much easier than
trying to follow the steps in src/interfaces/odbc/readme.txt.

Anyway, if we can verify that Cygwin psqlodbc.dll works correctly, then
I will add the --with-odbc option when I configure from now on.

Jason

--
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

Re: PostgreSQL for WinNT

From
Fred Yankowski
Date:
Jason,

On Fri, Apr 13, 2001 at 10:27:03AM -0400, Jason Tishler wrote:
> I just did the following (with 7.1rc4):
>
>     $ cd src/interfaces/odbc
>     $ make
>
> The above produced psqlodbc.dll which seems to be exporting the "right
> stuff."  How do I test this -- I have never used ODBC before.

Here are some messages I sent about my experience with this a few
months back.

<http://www.postgresql.org/mhonarc/pgsql-odbc/2001-02/msg00010.html>
<http://www.postgresql.org/mhonarc/pgsql-odbc/2001-02/msg00011.html>

> I'm quite willing to include ODBC support in my distribution.  However I
> will only include a Cygwin psqlodbc.dll -- including a straight Win32 one
> is confusing and could cause some problems.  There are too many Cygwin
> to non-Cygwin interaction problems on the Cygwin mailing list already...

A pure Cygwin version is fine by me, if one is available.  When I
asked for information about how to build an ODBC DLL that works,
Hiroshi Inoue was the only person to respond with any help, and he
steered me to the VC++ method given by the readme.txt.  That worked
and I left it at that.  The messages behind the above URLs recount my
problems trying to use the DLL built in response to configuring with
'--with-ODBC'.

OTOH, wouldn't a non-Cygwin DLL be useful for those cases where the
client machine isn't running the postgres/postmaster service, but
wants to access such a service on a remote machine?  It would be a
shame to have to install Cygwin just to allow that ODBC DLL to run.

> I just did the following (with 7.1rc4):
>
>     $ cd src/interfaces/odbc
>     $ nmake -f win32.mak
>
> The above produced Win32 psqlodbc.dll and seems to be much easier than
> trying to follow the steps in src/interfaces/odbc/readme.txt.

When I get some time I'll try that and see if the resulting DLL works
for me now.

--
Fred Yankowski           fred@OntoSys.com      tel: +1.630.879.1312
Principal Consultant     www.OntoSys.com       fax: +1.630.879.1370
OntoSys, Inc             38W242 Deerpath Rd, Batavia, IL 60510, USA

Re: Re: PostgreSQL for WinNT

From
Jason Tishler
Date:
Fred,

On Fri, Apr 13, 2001 at 10:28:17AM -0500, Fred Yankowski wrote:
> On Fri, Apr 13, 2001 at 10:27:03AM -0400, Jason Tishler wrote:
> > I'm quite willing to include ODBC support in my distribution.  However I
> > will only include a Cygwin psqlodbc.dll -- including a straight Win32 one
> > is confusing and could cause some problems.  There are too many Cygwin
> > to non-Cygwin interaction problems on the Cygwin mailing list already...
>
> OTOH, wouldn't a non-Cygwin DLL be useful for those cases where the
> client machine isn't running the postgres/postmaster service, but
> wants to access such a service on a remote machine?

Good point, but...

> It would be a
> shame to have to install Cygwin just to allow that ODBC DLL to run.

..one would only have to install cygwin1.dll -- not all of Cygwin.

Jason

--
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com