RE: [INTERFACES] Newbie question

Поиск
Список
Период
Сортировка
От Jackson, DeJuan
Тема RE: [INTERFACES] Newbie question
Дата
Msg-id F10BB1FAF801D111829B0060971D839F2B44C9@cpsmail
обсуждение исходный текст
Список pgsql-interfaces
>   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


В списке pgsql-interfaces по дате отправления:

Предыдущее
От: David Hartwig
Дата:
Сообщение: Re: [ADMIN] ODBC Call fail? (fwd)
Следующее
От: "Jackson, DeJuan"
Дата:
Сообщение: RE: [INTERFACES] whoops: VB RDO works just fine with new odbc dri ver....