On Tue, 1 Apr 2008, "John Reeve" <[EMAIL PROTECTED]> writes:
> I have the following scenario:
>
> A 'task' table that has the fields:
> id => primary key, updated on each insert using a sequence
> customerid => integer
> localid => integer
>
> I need the localid to be sequential an
John Reeve wrote:
> I've already considered:
> 1. I can't lock the table, because there are too many inserts happening
> and it will slow down the app.
In a locking approach you may not need to lock the whole table. You
should only need to lock the entry for the customer being altered, eg:
BEGIN
I have the following scenario:
A 'task' table that has the fields:
id => primary key, updated on each insert using a sequence
customerid => integer
localid => integer
I need the localid to be sequential and unique per unique customerid.
The data needs to look like this:
1, 92, 1
On Tue, Apr 1, 2008 at 6:04 PM, Stephan Szabo
<[EMAIL PROTECTED]> wrote:
> On Tue, 1 Apr 2008, Raphael Bauduin wrote:
>
> > The 2 following statements don't give the same result. I expected the
> > second ti give the exact same result as the first one.
>
> If any entree_id can be NULL they aren'
On Tue, 1 Apr 2008, Raphael Bauduin wrote:
> The 2 following statements don't give the same result. I expected the
> second ti give the exact same result as the first one.
If any entree_id can be NULL they aren't defined to give the same result.
EXCEPT is defined in terms of duplicates based on
Hi,
The 2 following statements don't give the same result. I expected the
second ti give the exact same result as the first one.
What am I missing?
development=> SELECT id FROM entrees except select entree_id from
postes ORDER BY id desc;
id
--
3651
(1 row)
development=> SELECT id FROM e