Fwd: problems changing postgres jdbc driver - Mailing list pgsql-jdbc

From Silvio Brandani
Subject Fwd: problems changing postgres jdbc driver
Date
Msg-id 56DFFF64.2040908@tech.sdb.it
Whole thread Raw
Responses Re: Fwd: problems changing postgres jdbc driver  (Albe Laurenz <laurenz.albe@wien.gv.at>)
List pgsql-jdbc


We have problems changing  postgres jdbc driver  from  postgresql-9.3-1102.jdbc41.jar to postgresql-9.4.1208.jar

we have table ap_invoice_t

Referenced by:
    TABLE "ap_invoice_m" CONSTRAINT "ap_invoice_m_fkey" FOREIGN KEY (branch_cod, orig_doc, doc_year, azienda) REFERENCES "123".ap_invoice_t(branch_cod, orig_doc, doc_year, azienda) ON DELETE CASCADE


the following operations are executed  in order:

DELETE FROM ap_invoice_t WHERE branch_cod = '2150100078' and doc_year = '2015' and orig_doc = '0000079369'and azienda='CX';
--'2150100078', $2 = '2015', $3 = '0000079369'

DELETE FROM ap_invoice_m WHERE branch_cod = '2150100078' and doc_year = '2015' and orig_doc = '0000079369'and azienda='CX';

INSERT INTO ap_invoice_t (branch_cod, doc_year, orig_doc, amount, az_remota, branch_ad2, branch_ad3, branch_ad4, branch_ad5, branch_nam, cage1, cage2,
cage3, cdes1, cdes2, cdes3, cfab1, cfab2, cfab3, data_manut, data_par, dept, descr, doc_date, doc_type, esito, file_ref, house_bl, lcl_fcl,
loc_destin, master_bl, mov_nr, notes, orig_ref, porto_car, porto_sca, targa, valuta, vettore, azienda)
values
($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40)

$1 = '2150100078', $2 = '2015', $3 = '0000079369', $4 = '150', $5 = '60', $6 = '19 MAYIS CAD. GOLDEN PLAZA NO : 3 KAT : 2', $7 = 'SISLI, ISTANBUL 34360', $8 = 'Tel. +90 212 395 1440', $9 = 'Fax. +90 212 355 3505', $10 = 'SAVINO DEL BENE NAKLIYAT A.S. ISTANBUL', $11 = '', $12 = '', $13 = '', $14 = 'SALAR PREFAB', $15 = 'KOYA MAIN STREET', $16 = ' ', $17 = 'DI IORIO SPA', $18 = 'ZONA INDUSTRIALE IL GIARDINO', $19 = ' S.ELENA SANNITA', $20 = '2016-03-08 00:00:00', $21 = '2016-03-08', $22 = '03', $23 = 'FURNITURE', $24 = '2015-12-11', $25 = 'DB', $26 = 'Y', $27 = 'XXXXCX', $28 = 'SDB01S106320', $29 = 'F', $30 = '', $31 = 'ARKAOI0000000658', $32 = '000001407', $33 = ' ARKU841046/6 Supplier Inv.: 981/01,979/01 ', $34 = 'O50686', $35 = 'ANCONA', $36 = 'MERSIN', $37 = NULL, $38 = 'USD', $39 = 'TA', $40 = 'CX'


INSERT INTO ap_invoice_m (branch_cod, cod_voce, doc_year, orig_doc, progr, des_voce, imp_voce, azienda) values ($1, $2, $3, $4, $5, $6, $7, $8)
DETAIL:  parameters: $1 = '2150100078', $2 = 'M01', $3 = '2015', $4 = '0000079369', $5 = '1', $6 = 'OCEAN IMPORT FREIGHT', $7 = '150', $8 = 'CX'
ERROR:  insert or update on table "ap_invoice_m" violates foreign key constraint "ap_invoice_m_fkey"
DETAIL:  Key (branch_cod, orig_doc, doc_year, azienda)=(2150100078 , 0000079369 , 2015, CX ) is not present in table "ap_invoice_t".
STATEMENT:  INSERT INTO ap_invoice_m (branch_cod, cod_voce, doc_year, orig_doc, progr, des_voce, imp_voce, azienda) values ($1, $2, $3, $4, $5, $6, $7, $8)

as you se we get unexpectedly Foreing key violation 


Please advise

--

Silvio Brandani




This message is for the recipients only. If you receive it in error, please notify the sender and delete it together with any attachments. For any further information, including our privacy policy please refer to http://www.savinodelbene.com/privacy/

pgsql-jdbc by date:

Previous
From: Albe Laurenz
Date:
Subject: Re: Fwd: problems changing postgres jdbc driver
Next
From: Silvio Brandani
Date:
Subject: Re: Fwd: problems changing postgres jdbc driver