[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Postgres Access Timing
- Subject: Re: Postgres Access Timing
- From: Chris Travers <..hidden..>
- Date: Sat, 25 Jul 2009 09:41:48 -0700
On Sat, Jul 25, 2009 at 2:24 AM, beamends <..hidden..>
The vendor is a set depending on which file is being processed. For now
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?
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.