EnterpriseDB: The Enterprise Postgres Company Postgres Plus Forums: The PostgreSQL Open Source Database from EnterpriseDB
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 

Bug while loading the data into a table in grisql  XML

Forum Index » GridSQL - Developers
Author Message
pavani_mallampati

Member

Joined: 12 Jul 2010 00:22:22
Messages: 15
Offline

Hi,
Please find the bug while loading the data into the table in gridsql,


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
Mason_S

Senior member

Joined: 1 Apr 2008 09:03:08
Messages: 380
Offline

The "not working" version appears to be older whereas it is working in the newer version. Please just use the newer version.

Regards,

Mason
[WWW]
pavani_mallampati

Member

Joined: 12 Jul 2010 00:22:22
Messages: 15
Offline

Can you please give me the solution for the older version..
Mason_S

Senior member

Joined: 1 Apr 2008 09:03:08
Messages: 380
Offline

I really recommend upgrading.

If you need the older version, you can look through the commit log to try and find a commit that just addresses your problem, and you can try and create a patch out of it and apply it to the old version.

Regards,

Mason
[WWW]
 
Forum Index » GridSQL - Developers
Go to:   
Powered by JForum 2.1.8 © JForum Team