Moving from MySQL to PostgreSQL with Ruby on Rails. - Mailing list pgsql-general

From Peter Michaux
Subject Moving from MySQL to PostgreSQL with Ruby on Rails.
Date
Msg-id 3cbaf1c80511170848m380b19ecga5954f79e19a9ca5@mail.gmail.com
Whole thread Raw
Responses Re: Moving from MySQL to PostgreSQL with Ruby on Rails.  (Robby Russell <robby.lists@planetargon.com>)
Re: Moving from MySQL to PostgreSQL with Ruby on Rails.  (David Fetter <david@fetter.org>)
List 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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Very slow queries on 8.1
Next
From: Bruno Wolff III
Date:
Subject: Re: Very slow queries on 8.1