Moving from MySQL to PostgreSQL with Ruby on Rails.

Поиск
Список
Период
Сортировка
От Peter Michaux
Тема Moving from MySQL to PostgreSQL with Ruby on Rails.
Дата
Msg-id 3cbaf1c80511170848m380b19ecga5954f79e19a9ca5@mail.gmail.com
обсуждение исходный текст
Ответы 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>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Very slow queries on 8.1
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: Very slow queries on 8.1