[DB-SIG] checking column types from cursor object in a database-independent way?

2013-04-19 Thread Dan Lenski
Hi, I have to dump some data from various databases (Oracle and Postgre, at the moment) into CSV files, while preserving the column type information so the data can be correctly loaded into another application. Basically, I need to write a function that can distinguish string/numeric data in th

Re: [DB-SIG] checking column types from cursor object in a database-independent way?

2013-04-19 Thread Vernon D. Cole
Give the restriction you mention (that you have only the cursor object) the solution you propose looks pretty good. The cursor.connection attribute is an extension, but I think most api modules provide it. On Fri, Apr 19, 2013 at 11:56 AM, Dan Lenski wrote: > Hi, > I have to dump some data fr

Re: [DB-SIG] checking column types from cursor object in a database-independent way?

2013-04-19 Thread Michael Bayer
On Apr 19, 2013, at 1:56 PM, Dan Lenski wrote: > Hi, > I have to dump some data from various databases (Oracle and Postgre, at the > moment) into CSV files, while preserving the column type information so the > data can be correctly loaded into another application. Basically, I need to > wri