Search Postgresql Archives

Re: Moving from MySQL to PostgreSQL with Ruby on Rails.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx> 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
*******************************************************/


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux