Re: non unique value error... pgsql,,help needed.

Поиск
Список
Период
Сортировка
От A. Kretschmer
Тема Re: non unique value error... pgsql,,help needed.
Дата
Msg-id 20081216102902.GG4557@a-kretschmer.de
обсуждение исходный текст
Ответ на non unique value error... pgsql,,help needed.  (Shri <shripatel@gmail.com>)
Список pgsql-hackers
In response to Shri :
> Dear friends,
> 
> I am trying to import db from oracle to pgsql,
> 
> meanwhile facing a difficulty during importing oracle numeric(38) to pgsql
> numeric(38) column, Because in oracle that column is unique, but PGsql not able
> to correctly identify different and unique values with numeric(38) field.
> 
> for eg.
> 
> column: a numeric(38) primary
> 
> giving me error of non unique value in following two data.
> 1. 111122223333444455556666777788889999
> 2. 111122223333444455556666777788889997  (<----- both are different.)
> 
> When i enter first data into column (using EMS SQL MANAGER),it converts it
> to 1.11122223333444E35

Can you try to insert such values with plain psql? I have tried that and
it works without trouble:

test=# create table foo (id serial, n numeric(38));
NOTICE:  CREATE TABLE will create implicit sequence "foo_id_seq" for serial column "foo.id"
CREATE TABLE
test=*# insert into foo (n) values (111122223333444455556666777788889999);
INSERT 0 1
test=*# select * from foo;id |                  n
----+-------------------------------------- 1 | 111122223333444455556666777788889999
(1 row)

test=*# insert into foo (n) values (111122223333444455556666777788889997);
INSERT 0 1
test=*# select * from foo;id |                  n
----+-------------------------------------- 1 | 111122223333444455556666777788889999 2 |
111122223333444455556666777788889997
(2 rows)

test=*# 


Which version do you have?

I think, it's a problem with EMS SQL MANAGER, but i don't know that tool.



Regards, Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Sync Rep: First Thoughts on Code
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: DTrace probes patch