Thread: Re: [HACKERS] ODBC driver flakieness
RS] ODBC driver flakieness > > > Hi Gowey, > Please post to pgsql-odbc list if the problem is ODBC > specific. > > "Gowey, Geoffrey" wrote: > > > > Two problems (I've been holding back reporting until I ran into this > > second): > > > > Background: I'm trying to migrate an existing db from MS > Sql 2K to pgsql by > > creating a DTS job. > > > > DB system info: NT 4 sp6a, MS SQL2K Regular, Pgsql ODBC > driver 7.01.00.06. > > > > First problem: The ODBC driver reports a column of type > money in pgsql (and > > in ms sql) as float4 and barfs when I try executing the job > because the data > > An example please. Just go into MS SQL and try creating a DTS job to migrate from MS SQL to Pgsql. Have both fields (in ms and pg) be of type money. In the destination the field type will show up as float4 instead of money. If you try executing the job it will bomb saying that it is sending data in the wrong format (or something to that effect [i forget]). > > > > > Second problem: I create a table with a serial column. This > table is not in > > the existing db and no values are being set. The job bombs > when executed > > with a "you don't have permissions to set sequence ..._seq" > (why this is > > being modified at all I do not know). > > Is this an ODBC problem ? > If the e.g. inserting user is different from the one who created > the table, UPDATE permission on the sequence should be granted > as well. I don't know. The table does not exist at all in the db that I'm migrating from (so why it's being touched at all I don't know). Also, I created the column with one user and am importing the table with another user as the odbc login, but that whole table is rwx for that user. Did I miss something? > > regards, > Hiroshi Inoue >
>Just go into MS SQL and try creating a DTS job to migrate from MS SQL to >Pgsql. Have both fields (in ms and pg) be of type money. In the >destination the field type will show up as float4 instead of money. If you >try executing the job it will bomb saying that it is sending data in the >wrong format (or something to that effect [i forget]). Hello, I had this problem before: 1) Try foat8 which is the normal mapping for money, 2) Make sure the local format of number are the same Example : SQL Server 100.000,00 FHT --> PostgreSQL US $100,000.00 will not work. Regards, Jean-Michel POURE
"Gowey, Geoffrey" wrote: > > RS] ODBC driver flakieness > > > > > > Hi Gowey, > > Please post to pgsql-odbc list if the problem is ODBC > > specific. > > > > "Gowey, Geoffrey" wrote: > > > > > > Second problem: I create a table with a serial column. This > > table is not in > > > the existing db and no values are being set. The job bombs > > when executed > > > with a "you don't have permissions to set sequence ..._seq" > > (why this is > > > being modified at all I do not know). > > > > Is this an ODBC problem ? > > If the e.g. inserting user is different from the one who created > > the table, UPDATE permission on the sequence should be granted > > as well. > > I don't know. The table does not exist at all in the db that I'm migrating > from (so why it's being touched at all I don't know). Also, I created the > column with one user and am importing the table with another user as the > odbc login, but that whole table is rwx for that user. Did I miss > something? Tables and sequences are independent objects and the permissions should be granted separately. You seem to have to grant a rwx permission on the sequence as well. regards, Hiroshi Inoue