Re: problems changing postgres jdbc driver - Mailing list pgsql-odbc

From Adrian Klaver
Subject Re: problems changing postgres jdbc driver
Date
Msg-id 56E0BD72.2010006@aklaver.com
Whole thread Raw
In response to problems changing postgres jdbc driver  (Silvio Brandani <silvio.brandani@tech.sdb.it>)
List pgsql-odbc
On 03/09/2016 02:46 AM, Silvio Brandani wrote:
> We have problems changing  postgres jdbc driver  from
> postgresql-9.3-1102.jdbc41.jar to postgresql-9.4.1208.jar

FYI this is the ODBC list. The JDBC list is here:

http://www.postgresql.org/list/pgsql-jdbc/

>
> 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
>
>
>
> disclaimer-sdb
> 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/
>


--
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-odbc by date:

Previous
From: Scott Ferrett
Date:
Subject: Re: Obtaining hundredths of a second data from time data types
Next
From: Laerte Antonio de Almeida Giraldelli
Date:
Subject: Problems installing Postgresql ODBC driver 32bits on Redhat 6.5