On Wed, Jul 2, 2008 at 2:55 AM, Matthew Kent <[EMAIL PROTECTED]> wrote:
> Hi all,
> I am having some strange errors in LSMB. Sometimes a transaction might be
> incorrect, so we will edit it and post again. Usually it works, however
> sometimes it fails with the following error and then transaction just
> disappears. I have had a look in the database and the transaction is just
> gone.
> This error came after somehow I had the same invoice in the system twice, on
> different days. I tried to change the date to the correct date, posted and
> got this:
> DBD::Pg::st execute failed: ERROR: duplicate key violates unique constraint
> "transactions_pkey"

This usually happens because the id sequence has become messed up.

The easiest fix (which corrects most of these) is (as run in the db):

SELECT setval('id', (select max(id) from transactions));

Best Wishes,
Chris Travers

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Ledger-smb-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users

Reply via email to