Re: A problem with sequences... - Mailing list pgsql-general

From Dima Tkach
Subject Re: A problem with sequences...
Date
Msg-id 3E54ECB3.1030708@openratings.com
Whole thread Raw
In response to Re: A problem with sequences...  (Richard Huxton <dev@archonet.com>)
Responses Re: A problem with sequences...  (Richard Huxton <dev@archonet.com>)
List pgsql-general
>
>
>Before looking into more obscure possibilities, are you using the sequence to
>generate these explicit id's? If not, that's why you're getting duplicates,
>the sequence generator doesn't know you've used these numbers.
>
>
>
Yeah... I understand this.
In this case, the id is *never* specified explicitly. Java app either
knows the id or it does not.
If it knows it, it does the update, otherwise, it does an insert, with
*no* id specified, and gets the new id back from that rule, so that time
it will
know the id and end up doing update...

I was referring to the situation in general when somehow (like data
migration) the id is specified, I just don't want that rule to barf. It
is definitely not what's causing my problem. So, let's get into those
'obscure possibilities' now :-)

Thanks!

Dima.




pgsql-general by date:

Previous
From: "Robert Echlin"
Date:
Subject: Re: 7.3.2 psql error!
Next
From: Jose Antonio Martinez
Date:
Subject: max connections