[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Upgrade duplicate key "transactions_pkey" problem SL 2.6.5 -> Ledgersmb 1.1.12



Armaghan Saqib wrote:
This is really strange.

Is this SL bug or something to do with postgres config?

Anybody know?

My guess is an sl bug. PostgreSQL is doing exactly what it is supposed to do, stop you from getting duplicate entries.

Joshua D. Drake


regards

On 6/16/07, Robert Fraser <..hidden..> wrote:
Hi


On 6/16/07, Robert Fraser <..hidden..> wrote:



On 6/16/07, Chris Travers < ..hidden..> wrote:
On 6/15/07, Robert Fraser <..hidden..> wrote:
Hi

I am getting 2 of these (vendor and customer) when I try to manually
upgrade
from Sql-ledger 2.6.5 to Ledgersmb 1.1.12 :


psql:/usr/local/lib/egsql-ledger/sql/Pg-upgrade-2.6.17-2.6.18.sql:211:
ERROR:  duplicate key violates unique constraint "transactions_pkey"

Try running the Pg-upgrade scripts manually and see where they fail.
This can be done in psql or Pgadmin III.


Thanks Chris

It is failing at line 139 and line 211 of


/usr/local/lib/egsql-ledger/sql/Pg-upgrade-2.6.17-2.6.18.sql
INSERT INTO transactions (id, table_name) SELECT id, 'customer' FROM
customer;
and

INSERT INTO transactions (id, table_name) SELECT id, 'vendor' FROM vendor;

There seem to be about 10 duplicate ids from customer and 5 from vendor

Cheers
Rob
I assume that for some reason SQL-Ledger has lost integrity for these rows
with duplicate ids (this instance of SQL-Ledger has been in use for quite a
while).  Do I need to choose one of the tables and change the offending ids
to something unique?  I guess depending on which one I choose to change, the
id may be a foreign key in another relation?

Thanks
Rob



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Ledger-smb-users mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users



--

      === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive  PostgreSQL solutions since 1997
             http://www.commandprompt.com/

Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/