-----Original Message-----
From: Chris Travers <[email protected]>
To: [email protected]
Sent: Sat, 25 Jul 2009 17:41
Subject: Re: [Ledger-smb-users] Postgres Access Timing












On Sat, Jul 25, 2009 at 2:24 AM, beamends <[email protected]> wrote:





On Fri, 2009-07-24 at 10:05 -0700, Chris Travers wrote:

> How are you determining the customer/vendor that was inserted as well

> as the part?

>




The vendor is a set depending on which file is being processed. For now

anyway it's hardcoded from looking at the vendor table with phppgadmin.



Much safer to use SELECT currval('id'); 
What if someone else inserts a vendor between when you do and when you look?

?



I'm not using the customer bits of a part at the moment. The part_id is

got from the part when created.



SELECT currval('id') works here too.? Both tables use the 'id' sequence though 
that will be changing in 1.3.
?
Otherwise, you could get timing issues.


Best Wishes,
Chris Travers



Hi Chris,
I don't know if you've got my last post yet. I'd just add that partsvendor is 
still taking quite a while to "get ready", but since I took out the bits 
mentioned there it is a lot better. Thinking back this probably might tie in 
with some posts I made about unique id errors a long while back - when adding a 
vendor through the LSMB parts window it very often takes two or three attempts 
to insert. There does seem to be something funny going on there. Or is it just 
me because of the size of the dabse may be?

Cheers
Richard



 





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



 





_______________________________________________
Ledger-smb-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users



 


________________________________________________________________________
AOL Email goes Mobile! You can now read your AOL Emails whilst on the move. 
Sign up for a free AOL Email account with unlimited storage today.
------------------------------------------------------------------------------
_______________________________________________
Ledger-smb-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users

Reply via email to