List all sequences in a Postgres db 8.1 with SQL

I’m converting a db from postgres to mysql. Since i cannot find a tool that does the trick itself, i’m going to convert all postgres sequences to autoincrement ids in mysql with autoincrement value. So, how can i list all sequences in a Postgres DB (8.1 version) with information about the table in which it’s … Read more

Change type of varchar field to integer: “cannot be cast automatically to type integer”

I have a small table and a certain field contains the type “character varying“. I’m trying to change it to “Integer” but it gives an error that casting is not possible. Is there a way around this or should I just create another table and bring the records into it using a query. The field … Read more

Completely uninstall PostgreSQL 9.0.4 from Mac OSX Lion?

This question may look like a duplicate of: How to uninstall postgresql on my Mac (running Snow Leopard) however, there are two major differences. I’m running Lion and I’m trying to uninstall PostgreSQL 9.0.4. I’ve looked at the last question and the link that it referenced, but I did not find a file called “uninstall-postgresql” … Read more

Repairing Postgresql after upgrading to OSX 10.7 Lion

I recently upgraded to OSX 10.7, at which point my rails installation completely borked when trying to connect to the psql server. When I do it from the command line using psql -U postgres it works totally fine, but when I try to run the rails server or console with the same username and password, … Read more