From: Jackson, DeJuan <djackson@cpsgroup.com>
To: leif@danmos.dk
To: pgsql-interfaces@postgreSQL.org
Subject: RE: [INTERFACES] Newbie question
Date: Mon, 1 Jun 1998 15:13:22 -0500
Message-ID: <F10BB1FAF801D111829B0060971D839F2B44C9@cpsmail> (raw)
> Hello,
>
> Please forgive me for a newbie question!
>
> I have just installed and are running PostgreSQL 6.3.2 fine
> including
> psql on Linux 2.0.33.
>
> I need to get access to it from several Windows 95 worstations using
> ODBC.
> I have a C++ program that are using ODBC/SQL... calls, which works
> fine on
> Linux using Sergey's pgodbc interface. The C++ program is written
> using a
> cross platform GUI library called wxWindows. This program is already
> running
> under Windows 95 without the ODBC interface, I just need to hook it up
> to
> my PostgreSQL database.
>
> Could someone please give me a step-by-step idea of how to get ODBC
> running on Win95 and whatever tools/programs is needed for that?
Well, I've never done it myself, but I'll give it a shot.
1) get the newest driver from http://www.insightdist.com/psqlodbc and
compile it
2) set up your PostgreSQL database to use TCP/IP
A) to do this add in the '-i' option when you start the postmaster
B) edit you pg_hba.conf file appropriately.
3) Make sure you program is connecting to the correct machine, username,
and password.
> I also have a PostgreSQL question: I have had the need for changing
> the attribute of a column, e.g. int2 -> int4 or char(10) -> char(20).
> psql doesn't seem to report how to do it, and whatever I tried failed.
> Is it at all possible? I have been working quite a lot with the very
> old
> Informix database, and here it is a simple matter for 'isql'.
You could try:
ALTER TABLE table_name RENAME TO tmp_table;
CREATE TABLE table_name (new_columns ...);
INSERT INTO table_name SELECT old_columns ... FROM tmp_table;
DROP TABLE tmp_table;
recreate the indexes and maybe VACUUM ANALYZE
The only problem with this is you'll have to make sure you can convert
from the original column type to the new one, 6.4 should handle this a
lot better when it comes out.
> Thanks in advance,
You're welcome.
Hope this helps,
-DEJ
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-interfaces@postgresql.org
Cc: djackson@cpsgroup.com, leif@danmos.dk
Subject: Re: [INTERFACES] Newbie question
In-Reply-To: <F10BB1FAF801D111829B0060971D839F2B44C9@cpsmail>
References: <F10BB1FAF801D111829B0060971D839F2B44C9@cpsmail>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox