bigger problem

Lists: pgsql-sql
From: "Carlos Sousa" <carlosdsousa(at)hotmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: bigger problem
Date: 2002-11-11 14:57:34
Message-ID: F51Y1R1ybSyGE5oHKoF00002df8@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

in postgres database i created a table with a field like

create table (...)
(...)
var text default '' not null
(...)

now i need to import the data from this table into a oracle database
i used pg_dump

I altered the field data type to

(...)
var varchar2(50) default '' not null
(...)

but when i was importing the the table into the oracle database all the rows
with the field var='' were not inserted.
Is there a way to work this around

thanks for your time and replay

_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail


From: "Josh Berkus" <josh(at)agliodbs(dot)com>
To: "Carlos Sousa" <carlosdsousa(at)hotmail(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: bigger problem
Date: 2002-11-11 18:13:29
Message-ID: web-1821180@davinci.ethosmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

Carlos,

> in postgres database i created a table with a field like
>
> create table (...)
> (...)
> var text default '' not null
> (...)
>
> now i need to import the data from this table into a oracle database
> i used pg_dump
>
> I altered the field data type to
>
> (...)
> var varchar2(50) default '' not null
> (...)
>
> but when i was importing the the table into the oracle database all
> the rows with the field var='' were not inserted.
> Is there a way to work this around

This is a problem with your configuration of Oracle import. See your
Oracle documentation; we cannot help you here.

-Josh Berkus


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Carlos Sousa <carlosdsousa(at)hotmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: bigger problem
Date: 2002-11-11 20:12:37
Message-ID: Pine.LNX.4.44.0211112004070.12428-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

Carlos Sousa writes:

> (...)
> var varchar2(50) default '' not null
> (...)
>
> but when i was importing the the table into the oracle database all the rows
> with the field var='' were not inserted.
> Is there a way to work this around

Yes, don't use Oracle.

In Oracle, '' is the same as null, so the constraint is not satisfied.

--
Peter Eisentraut peter_e(at)gmx(dot)net