Can you show the output of \d geo_data ?
Try 'using' delimiters
Are you doing this as the postgres superuser?
Because COPY can't load from files as a casual user, you need to pipe it to
copy & read from stdin.
Simple script below works for me, modified copy statement might help?.
HTH,
Bren
Thanks Tom that did it :)
James: I'll add those books to my list
I appreciate everyone's help!
On Fri, Jul 15, 2011 at 2:16 PM, Tom Lane wrote:
> Bryan Nelson writes:
>> Tom, rake is a rails command, also after doing a \d geo_data it does
>> show that it's adding an id column before everythin
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 crea
On Jul 15, 2011, at 12:06 PM, Bryan Nelson wrote:
> Hi Scott, do you know if it's possible to force it not to create the
> extra field?
If you do that, you are going to have to figure out how to get Rails to work
with that table--which is probably far beyond the Rails help you're going to
get o
Bryan Nelson writes:
> 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.
No need t
On Friday, July 15, 2011 10:33:34 am Bryan Nelson wrote:
> Tom, the file was created in linunx and is utf-8. Here is the rake
> task that created the table:
>
> class CreateGeoData < ActiveRecord::Migration
ActiveRecord will add an auto-incrementing id column to the table. You will
need
to loo
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 i
On Jul 15, 2011, at 11:44 AM, Tom Lane wrote:
> Never heard of rake before, but I'm betting that it's doing stuff
> behind your back, like including an "id" column in the table definition.
> Try looking at the table in psql (\d geo_data), or enabling query
> logging on the server so you can see wh
On 07/15/2011 10:42 AM, Steve Crawford wrote:
.
Error Message
-
ERROR: invalid input syntax for integer: "96799"
CONTEXT: COPY geo_data, line 1, column id: "96799"
If you have given us a correct table layout, there is no column 96799
...
Oops, meant column "id".
Cheers,
Steve
-
Bryan Nelson writes:
> Tom, the file was created in linunx and is utf-8. Here is the rake
> task that created the table:
> class CreateGeoData < ActiveRecord::Migration
> def self.up
> create_table :geo_data do |t|
> t.column :zip_code, :text
> t.column :latitude, :float8
>
On 07/15/2011 09:03 AM, Bryan Nelson wrote:
I am having problems importing a CSV file of sample data for testing
in a web app.
Do you mean that you are importing the data using something like psql to
use in a web app or that you are testing a web-app that does the import?
Columns& Types
--
Tom, the file was created in linunx and is utf-8. Here is the rake
task that created the table:
class CreateGeoData < ActiveRecord::Migration
def self.up
create_table :geo_data do |t|
t.column :zip_code, :text
t.column :latitude, :float8
t.column :longitude, :float8
thout quotes.
>>
>> Susan
>>
>> -Original Message-
>> From: pgsql-general-ow...@postgresql.org
>> [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Bryan Nelson
>> Sent: Friday, July 15, 2011 9:04 AM
>> To: pgsql-gener
and created a test CSV
> file, it worked fine both with and without quotes.
>
> Susan
>
> -Original Message-
> From: pgsql-general-ow...@postgresql.org [mailto:
> pgsql-general-ow...@postgresql.org] On Behalf Of Bryan Nelson
> Sent: Friday, July 15, 2011 9:04 AM
> T
Bryan Nelson writes:
> I am having problems importing a CSV file of sample data for testing
> in a web app.
> Columns & Types
> ---
> zip_code - text
> lattitude - float8
> longitude - float8
> city - text
> state - text
> county - text
> Some Sample Data From CSV File
>
thout quotes.
Susan
-Original Message-
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Bryan Nelson
Sent: Friday, July 15, 2011 9:04 AM
To: pgsql-general@postgresql.org
Subject: [GENERAL] Error Importing CSV File
I am having problems import
ral@postgresql.org
> Subject: [GENERAL] Error Importing CSV File
>
> I am having problems importing a CSV file of sample data for testing
> in a web app.
>
> Columns & Types
> ---
> zip_code - text
> lattitude - float8
> longitude - float8
Hi Adrian, yes that is the entire table definition.
On Fri, Jul 15, 2011 at 12:30 PM, Adrian Klaver wrote:
> On 07/15/2011 09:03 AM, Bryan Nelson wrote:
>>
>> I am having problems importing a CSV file of sample data for testing
>> in a web app.
>>
>> Columns& Types
>> ---
>> zip_
ly 15, 2011 9:04 AM
To: pgsql-general@postgresql.org
Subject: [GENERAL] Error Importing CSV File
I am having problems importing a CSV file of sample data for testing
in a web app.
Columns & Types
---
zip_code - text
lattitude - float8
longitude - float8
city - text
state - te
On 07/15/2011 09:03 AM, Bryan Nelson wrote:
I am having problems importing a CSV file of sample data for testing
in a web app.
Columns& Types
---
zip_code - text
lattitude - float8
longitude - float8
city - text
state - text
county - text
Is this the complete table description
I am having problems importing a CSV file of sample data for testing
in a web app.
Columns & Types
---
zip_code - text
lattitude - float8
longitude - float8
city - text
state - text
county - text
Some Sample Data From CSV File
--
96799,-7.209975,-170.77
21 matches
Mail list logo