Re: Error Importing CSV File

From: James B. Byrne
Subject: Re: Error Importing CSV File
Date: ,
Msg-id: 52154.216.185.71.25.1310753626.squirrel@webmail.harte-lyne.ca
(view: Whole thread, Raw)
In response to: Error Importing CSV File  (Bryan Nelson)
List: pgsql-general

Tree view

Error Importing CSV File  (Bryan Nelson, )
 Re: Error Importing CSV File  (Adrian Klaver, )
  Re: Error Importing CSV File  (Bryan Nelson, )
 Re: Error Importing CSV File  (Susan Cassidy, )
  Re: Error Importing CSV File  (Bryan Nelson, )
 Re: Error Importing CSV File  (Susan Cassidy, )
  Re: Error Importing CSV File  (Rick Genter, )
   Re: Error Importing CSV File  (Bryan Nelson, )
 Re: Error Importing CSV File  (Tom Lane, )
  Re: Error Importing CSV File  (Bryan Nelson, )
   Re: Error Importing CSV File  (Tom Lane, )
    Re: Error Importing CSV File  (Scott Ribe, )
    Re: Error Importing CSV File  (Bryan Nelson, )
     Re: Error Importing CSV File  (Tom Lane, )
      Re: Error Importing CSV File  (Bryan Nelson, )
   Re: Error Importing CSV File  (Adrian Klaver, )
 Re: Error Importing CSV File  (Steve Crawford, )
  Re: Error Importing CSV File  (Steve Crawford, )
 Re: Error Importing CSV File  (Scott Ribe, )
 Re: Error Importing CSV File  ("James B. Byrne", )
 Re: Error Importing CSV File  ("Brent Wood", )

On: Fri, 15 Jul 2011 13:57:03 -0400, Bryan Nelson
<>

> 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:
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:

From: "Brent Wood"
Date:
Subject: Re: Error Importing CSV File
From: - -
Date:
Subject: Slow query with sub-select