Re: Error Importing CSV File - Mailing list pgsql-general

From James B. Byrne
Subject Re: Error Importing CSV File
Date
Msg-id 52154.216.185.71.25.1310753626.squirrel@webmail.harte-lyne.ca
Whole thread Raw
In response to Error Importing CSV File  (Bryan Nelson <shrek@shreks-place.com>)
List pgsql-general
On: Fri, 15 Jul 2011 13:57:03 -0400, Bryan Nelson
<shrek@shreks-place.com>

> Tom, rake is a rails command, also after doing a \d geo_data
> it does show that it's adding an id column before everything
> else. I'm guessing my best bet is going to be creating the table
> by hand as I have no idea how to tell it not to create the extra
> field.
>
> Thanks for the help everyone, figured it had to be something
> simple.  Shows how new I am at postgres.
>

1. Rake has nothing to do with Ruby on Rails.  Rake is the Ruby Make
utility.  I believe that it and RubyGems, the Ruby package manager,
are now bundled with Ruby-1.9 but they are still separate projects
and utilities. The RoR framework is a completely different beast.

2. If you are using rake db:migrate then you are using
ActiveModel/ActiveRecord from Rails which provides the task that you
are running with Rake. Removing the synthetic key (:id) that AR
expects from your tables is going to cause you a world of hurt if
you then expect to access your database using ActiveRecord.

3. I suggest that you obtain the use of a copy of "The Rails Way" by
Obie Fernandez or either "Ruby for Rails" or "The Well-Grounder
Rubist" by David A. Black before you go much further into your
project.



--
***          E-Mail is NOT a SECURE channel          ***
James B. Byrne                mailto:ByrneJB@Harte-Lyne.ca
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3


pgsql-general by date:

Previous
From: Scott Ribe
Date:
Subject: Re: Error Importing CSV File
Next
From: Bryan Nelson
Date:
Subject: Re: Error Importing CSV File