Re: Ignorar las restricciones

From: Víctor Pérez Juárez <victor(dot)perez(at)e-evolution(dot)com>
To: Hugo Gamarra <hgamarra(at)hacienda(dot)gov(dot)py>, pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: Ignorar las restricciones
Date: 2005-10-03 16:54:39
Message-ID: 4341624F.5040703@e-evolution.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

el problema es que druid me genera la estructura de las tablas de esta
manera:

*CREATE* *TABLE* AD_PRINTTABLEFORMAT
(
AD_PRINTTABLEFORMAT_ID numeric(10,0),
AD_CLIENT_ID numeric(10,0) *not* *null*,
AD_ORG_ID numeric(10,0) *not* *null*,
ISACTIVE char(1) *default* 'Y' *not* *null*,
CREATED timestamptz *default* current_timestamp *not* *null*,
CREATEDBY numeric(10,0) *not* *null*,
UPDATED timestamptz *default* current_timestamp *not* *null*,
UPDATEDBY numeric(10,0) *not* *null*,
HDR_PRINTFONT_ID numeric(10,0),
HDRTEXTFG_PRINTCOLOR_ID numeric(10,0),
HDRTEXTBG_PRINTCOLOR_ID numeric(10,0),
HDRLINE_PRINTCOLOR_ID numeric(10,0),
FUNCT_PRINTFONT_ID numeric(10,0),
FUNCTBG_PRINTCOLOR_ID numeric(10,0),
FUNCTFG_PRINTCOLOR_ID numeric(10,0),
LINE_PRINTCOLOR_ID numeric(10,0),
DESCRIPTION varchar(510),
ISPAINTBOUNDARYLINES char(1) *default* 'N' *not* *null*,
ISPAINTHLINES char(1) *default* 'N' *not* *null*,
ISPAINTVLINES char(1) *default* 'N' *not* *null*,
ISPRINTFUNCTIONSYMBOLS char(1) *default* 'Y' *not* *null*,
NAME varchar(120) *not* *null*,
ISDEFAULT char(1) *default* 'N' *not* *null*,
IMAGEURL varchar(240),
HEADERLEFT varchar(510),
HEADERCENTER varchar(510),
HEADERRIGHT varchar(510),
FOOTERLEFT varchar(510),
FOOTERCENTER varchar(510),
FOOTERRIGHT varchar(510),
IMAGEISATTACHED char(1) *default* 'N',
HDRSTROKE numeric(10,0),
LINESTROKE numeric(10,0),
HDRSTROKETYPE char(1),
LINESTROKETYPE char(1),
ISPAINTHEADERLINES char(1) *default* 'Y' *not* *null*,

*primary* *key*(AD_PRINTTABLEFORMAT_ID),

*foreign* *key*(HDR_PRINTFONT_ID) *references* AD_PRINTFONT(AD_PRINTFONT_ID),
*foreign* *key*(HDRTEXTFG_PRINTCOLOR_ID) *references* AD_PRINTCOLOR(AD_PRINTCOLOR_ID),
*foreign* *key*(HDRTEXTBG_PRINTCOLOR_ID) *references* AD_PRINTCOLOR(AD_PRINTCOLOR_ID),
*foreign* *key*(HDRLINE_PRINTCOLOR_ID) *references* AD_PRINTCOLOR(AD_PRINTCOLOR_ID),
*foreign* *key*(FUNCT_PRINTFONT_ID) *references* AD_PRINTFONT(AD_PRINTFONT_ID),
*foreign* *key*(FUNCTBG_PRINTCOLOR_ID) *references* AD_PRINTCOLOR(AD_PRINTCOLOR_ID),
*foreign* *key*(FUNCTFG_PRINTCOLOR_ID) *references* AD_PRINTCOLOR(AD_PRINTCOLOR_ID),
*foreign* *key*(LINE_PRINTCOLOR_ID) *references* AD_PRINTCOLOR(AD_PRINTCOLOR_ID)
);

Saludos
Victor

Hugo Gamarra escribió:

>Hola!!!
>Podrías migrar primero la estructura, sigues con los datos y por ultimo los
>índices y restricciones.
>
>Saludos Cordiales,
>Hugo Gamarra
>
>-------Mensaje original-------
>
>De: Víctor Pérez Juárez
>Fecha: 10/03/05 12:27:24
>Para: pgsql-es-ayuda(at)postgresql(dot)org
>Asunto: [pgsql-es-ayuda] Ignorar las restricciones
>
>Hola a los amantes de PostgreSQL!
>
>estoy trabajando con el manejador de multiples bases de datos Druid un
>projecto open source creado en java muy bueno.
>
>por medio de druid migre mi esquema de una base de datos Oracle a
>PostgreSQL incluyendo, Tablas , Views , Indices , Restriciones.
>
>hasta qui todo de maravilla, subo el esquema a oracle sin problemas,
>pero cuando quiero subir mis datos las restriciones no me dejan ya que
>obtengo errores como estos:
>
>
>Key (c_bpartner_id)=(113) is not present in table "c_bpartner".
>ERROR: insert or update on table "ad_column" violates foreign key
>constraint "ad_column_ad_table_id_fkey"
>
>
>existe alguna forma de desactivar las restricciones para poder subir mi
>data.sql que contiene sentencias INSERT y posteriormente activar nuevamente.
>
>Probe con SET CONSTRAINTS ALL DEFERRED; sin existo
>
>
>
>Saludos
>Victor
>www.e-evolution.com
>
>
>
>
>---------------------------(fin del mensaje)---------------------------
>TIP 7: no olvides aumentar la configuración del "free space map"
>
>

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Rafael Taboada 2005-10-03 17:55:17 [OFF-TOPIC] Diseño de BD
Previous Message Víctor Pérez Juárez 2005-10-03 16:28:49 Re: Ignorar las restricciones