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

From Robby Russell
Subject Re: Moving from MySQL to PostgreSQL with Ruby on Rails.
Date
Msg-id 1132263896.5569.78.camel@linus
Whole thread Raw
In response to Re: Moving from MySQL to PostgreSQL with Ruby on Rails.  (Bruno Wolff III <bruno@wolff.to>)
Responses Re: Moving from MySQL to PostgreSQL with Ruby on Rails.  (Vivek Khera <vivek@khera.org>)
List pgsql-general
On Thu, 2005-11-17 at 15:10 -0600, Bruno Wolff III wrote:
> On Thu, Nov 17, 2005 at 09:23:51 -0800,
>   Robby Russell <robby.lists@planetargon.com> wrote:
> >
> > CREATE TABLE product (
> >   id SERIAL PRIMARY KEY,
> >   name VARCHAR(255) NOT NULL DEFAULT '',
> > );
>
> And depending on why you chose VARCHAR(255), you may really want to use TEXT
> instead.

Mainly because, Rails will generate forms based on the data types
differently. A text field -> VARCHAR... textarea -> TEXT.

Sort of a meta-approach for Rails-based scaffolding generator. Not
required, but it'll speed up the process and limit the number of chars
that you can stick into a text field opposed to a text area.

Robby

--
/******************************************************
* Robby Russell, Founder.Developer.Geek
* PLANET ARGON, Rails Development, Consulting & Hosting
* Portland, Oregon  | p: 503.351.4730 | f: 815.642.4068
* www.planetargon.com | www.robbyonrails.com
* Programming Rails   | www.programmingrails.com
*******************************************************/


pgsql-general by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: Rebranding PostgreSQL
Next
From: Robert Treat
Date:
Subject: Re: Rebranding PostgreSQL