Moving from MySQL to PostgreSQL with Ruby on Rails.

From: Peter Michaux <petermichaux(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Moving from MySQL to PostgreSQL with Ruby on Rails.
Date: 2005-11-17 16:48:45
Message-ID: 3cbaf1c80511170848m380b19ecga5954f79e19a9ca5@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I'm just new to the PostgreSQL world. I've been using MySQL but I want to
develop a Ruby on Rails application that can be installed on either MySQL or
PostgreSQL. I don't know how much the DDL dialects vary between them. At the
moment I am interested in the options on a table like UTF-8. In MySQL I
write

CREATE TABLE product (
id INT NOT NULL AUTOINCREMENT,
name VARCHAR(255) NOT NULL DEFAULT '',
PRIMARY KEY (id)
) DEFAULT CHARSET=UTF-8;

Will this definition work in the PostgreSQL world? Is there a web page for
people with MySQL exerience moving to PostgreSQL?

Part of the issue is the way Ruby on Rails migration class enables me to add
options to Rails' own abstraced DDL just like I have done in the above
example. Other ways of adding options might be tricky.

Thanks,
Peter

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2005-11-17 16:52:25 Re: Very slow queries on 8.1
Previous Message Martijn van Oosterhout 2005-11-17 16:48:31 Re: Very slow queries on 8.1