Moving data from SQL Server to Postgres via VFP ODBC Driver - Mailing list pgsql-odbc

From Calvin
Subject Moving data from SQL Server to Postgres via VFP ODBC Driver
Date
Msg-id loom.20100809T190420-758@post.gmane.org
Whole thread Raw
Responses Re: Moving data from SQL Server to Postgres via VFP ODBC Driver  (Richard Broersma <richard.broersma@gmail.com>)
Re: Moving data from SQL Server to Postgres via VFP ODBC Driver  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-odbc
I am attempting to move data from a SQL Server 2008 database to Postgres v8.4. I
am using Visual Fox Pro as an intermediate step in this process. I open a
connection to the SQL tables using the ODBC driver and at the same time open a
connect to the PostGres table using PostgresSQL30. The reason I am doing it this
way is I cannot seem to overcome issues concerning bit fields in SQL Server and
Booleans in Postgres. Using VFP I can do a quick and dirty conversion. However,
the problem is that when I look at the data in Postgres it converted
successfully with the exception of varying character fields which have been
padded to their maximum length. My insert statement is in the form :

Insert into PostgresTableName Values(m.field1, trim(m.field2....)

The m. systax is because I am using memory variables in VFP. The data contained
in the m.fields has all be trimmed if it is character type.

Is there any way to keep varying character fields from being padded out to their
maximum length.

Thanks!

pgsql-odbc by date:

Previous
From:
Date:
Subject: [ psqlodbc-Bugs-1010864 ] CODBCFieldInfo field type (m_nSQLType) is incorrect
Next
From: Richard Broersma
Date:
Subject: Re: Moving data from SQL Server to Postgres via VFP ODBC Driver