BUG #5544: Bug while loading the csv file into the table - Mailing list pgsql-bugs
From | Pavani Mallampati |
---|---|
Subject | BUG #5544: Bug while loading the csv file into the table |
Date | |
Msg-id | 201007080844.o688ib7q076422@wwwmaster.postgresql.org Whole thread Raw |
Responses |
Re: BUG #5544: Bug while loading the csv file into the table
|
List | pgsql-bugs |
The following bug has been logged online: Bug reference: 5544 Logged by: Pavani Mallampati Email address: pavanimallampati@gmail.com PostgreSQL version: 8.3 Operating system: Centos Description: Bug while loading the csv file into the table Details: NOT WORKING The âpostgresâ version I am using was mentioned below. Postgres version: postgres=# select version(); version ---------------------------------------------------------------------------- --------------------------- PostgreSQL 8.3.3 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.3 20041212 (Red Hat 3.4.3-9.EL4) (1 row) The âgridsqlâ version I am using was mentioned below. GRID version: GridSQL -> select version(); +-------------+ | EXPRESSION5 | +-------------+ | 1.0.0.6 | +-------------+ 1 row(s). Creating âempâ table in grid with the syntax. GridSQL -> create table employee_details(emp_id integer, GridSQL -> emp_name varchar, GridSQL -> emp_address varchar) with xrowid; OK And the table was successfully created. Loading the data into the table using copy: I have a âcsvâ file like [postgres@localhost ~]$ cat emp.csv 1,postgres1,newyork 2,postgres1,newyork 3,postgres1,newyork 4,postgres1,newyork 5,postgres1,newyork 6,postgres1,newyork 7,postgres1,newyork 8,postgres1,newyork 9,postgres1,newyork 10,postgres1,newyork While loading the data into the table using the copy command then I am getting the error as shown below. GridSQL -> copy employee_details from '/home/postgres/emp.csv' delimiter ',' CSV; SQLException: ERROR: java.lang.NumberFormatException: For input string: "newyork" If I drop the XROWID column then the data is loaded GridSQL -> alter table employee_details drop column xrowid; OK GridSQL -> copy employee_details from '/home/postgres/emp.csv' delimiter ',' CSV; OK WHYâ¦â¦â¦â¦â¦â¦â¦â¦â¦â¦â¦â¦â¦â¦â¦â¦.. Please replyâ¦â¦â¦â¦â¦â¦â¦â¦â¦â¦â¦â¦â¦â¦.. WORKING While working with another version it was working Postgres version: postgres=# select version(); version ---------------------------------------------------------------------------- ---------------------------------- PostgreSQL 8.3.2 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 3.4.3 20041212 (Red Hat 3.4.3-9.EL4) (1 row) GRID version: GridSQL -> select version(); +---------+ | version | +---------+ | 1.1.0.9 | +---------+ 1 row(s). Creating âempâ table in grid with the same syntax. GridSQL -> create table employee_details(emp_id integer, GridSQL -> emp_name varchar, GridSQL -> emp_address varchar) with xrowid; OK And the table was successfully created. Loading the data into the table using copy: I have a âcsvâ file like as same as above [postgres@localhost ~]$ cat emp.csv 1,postgres1,newyork 2,postgres1,newyork 3,postgres1,newyork 4,postgres1,newyork 5,postgres1,newyork 6,postgres1,newyork 7,postgres1,newyork 8,postgres1,newyork 9,postgres1,newyork 10,postgres1,newyork Data loaded successfully: GridSQL -> copy employee_details from '/home/postgres/emp.csv' delimiter ',' CSV; OK
pgsql-bugs by date: