pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Silvio Brandani <silvio.brandani@tech.sdb.it>
To: pgsql-jdbc@postgresql.org
Subject: Fwd: problems changing postgres jdbc driver
Date: Wed, 9 Mar 2016 11:48:04 +0100
Message-ID: <56DFFF64.2040908@tech.sdb.it> (raw)
In-Reply-To: <56DFFF23.7090705@tech.sdb.it>
References: <56DFFF23.7090705@tech.sdb.it>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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 
constrain*t "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/



--------------------------------------------------------------------------------

view thread (10+ messages)  latest in thread

Message-ID: <56DFFF64.2040908@tech.sdb.it>
Permalink:  ../56DFFF64.2040908@tech.sdb.it/
Also on:    postgresql.org/message-id/56DFFF64.2040908@tech.sdb.it

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: silvio.brandani@tech.sdb.it
  Subject: Re: Fwd: problems changing postgres jdbc driver
  In-Reply-To: <56DFFF64.2040908@tech.sdb.it>
  References: <56DFFF23.7090705@tech.sdb.it> <56DFFF64.2040908@tech.sdb.it>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox