Re: [sqlalchemy] Postgres migration issue
Hi David Thanks for that - much appreciated :-) Hi I usually use MySQL to develop on, however I need to work with Postgres for the first time today so I fired it up. I have a routine which converts a non-SQL database into the database of choice, converting its schema into a new table in the target database using SQA, and then copies all the data in the source database into the new SQL table. That all worked fine into the Postgres+pg8000 database. My problem is when I then attempt to open up a table again using auto reflection I get an error I've never seen before, and I don't get how this can be, given the table was created via sqlalchemy? The data looks fine in the table, and all columns are created as I expected (converting to the correct Postrgres column types etc. Error when I issue t = Table('my_table', meta, autoload=True) is; (sorry about the screen shot, I'm working in a bad RDP client and can't cut/paste into my Mac. :-( PastedGraphic-1.png So it appears to be having some problem in the reflection, but I can't see why - I hope there is a setting in the connection or something I can do to fix this up? I've never used Postgres before, so I'm groping in the dark.. From Googling around, it appears that there is some issue with determining the schema or some such, but it's all assuming I know a lot more about Postgres than I do! Cheers Warwick Hi Warwick, You are using pg8000 1.08 and PostgreSQL = 9.0. Upgrade to pg8000 1.09, it fixes this issue (there are new PostgreSQL types introduced in version 9 which pg8000 didn't know of in 1.08, and added in 1.09). regards -- David Moore Senior Software Engineer St. James Software Email: dav...@sjsoft.com -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en. -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
Re: [sqlalchemy] Postgres migration issue
On Aug 9, 2012, at 7:58 PM, Warwick Prince wrote: Hi I usually use MySQL to develop on, however I need to work with Postgres for the first time today so I fired it up. I have a routine which converts a non-SQL database into the database of choice, converting its schema into a new table in the target database using SQA, and then copies all the data in the source database into the new SQL table. That all worked fine into the Postgres+pg8000 database. My problem is when I then attempt to open up a table again using auto reflection I get an error I've never seen before, and I don't get how this can be, given the table was created via sqlalchemy? The data looks fine in the table, and all columns are created as I expected (converting to the correct Postrgres column types etc. I'd highly recommend using psycopg2 here. Its featureset, performance (it's written completely in C), project velocity , and support responsiveness are unmatched not just by pg8000 but any other DBAPI I've used. -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
Re: [sqlalchemy] Postgres migration issue
- Original Message - Hi I usually use MySQL to develop on, however I need to work with Postgres for the first time today so I fired it up. I have a routine which converts a non-SQL database into the database of choice, converting its schema into a new table in the target database using SQA, and then copies all the data in the source database into the new SQL table. That all worked fine into the Postgres+pg8000 database. My problem is when I then attempt to open up a table again using auto reflection I get an error I've never seen before, and I don't get how this can be, given the table was created via sqlalchemy? The data looks fine in the table, and all columns are created as I expected (converting to the correct Postrgres column types etc. Error when I issue t = Table('my_table', meta, autoload=True) is; (sorry about the screen shot, I'm working in a bad RDP client and can't cut/paste into my Mac. :-( So it appears to be having some problem in the reflection, but I can't see why - I hope there is a setting in the connection or something I can do to fix this up? I've never used Postgres before, so I'm groping in the dark.. From Googling around, it appears that there is some issue with determining the schema or some such, but it's all assuming I know a lot more about Postgres than I do! Cheers Warwick Hi Warwick, You are using pg8000 1.08 and PostgreSQL = 9.0. Upgrade to pg8000 1.09, it fixes this issue (there are new PostgreSQL types introduced in version 9 which pg8000 didn't know of in 1.08, and added in 1.09). regards -- David Moore Senior Software Engineer St. James Software Email: dav...@sjsoft.com -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en. attachment: PastedGraphic-1.png