Search Postgresql Archives

Re: Problems with sequences

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 07, 2006 at 07:15:43AM -0400, Arturo Perez wrote:
> Note that all of the above was in an attempt to reset the sequence to  
> the proper value.  I'm beginning to think that it's a library problem  
> as this morning I get:
> 
> iht=> select max(article_id) from article;
> max
> ------
> 4992
> (1 row)
> 
> iht=> select nextval('pk_article');
> nextval
> ---------
>     4986
> (1 row)
> 
> Assuming the sequence number is being used correctly why would they  
> be 6 apart?

The last four transactions could be rolled back, or not committed yet.

I'd suggest looking at your insert statements. If the actual inserts
are insterting actual numbers, look very very carefully where the numbers
are coming from.

Have a nice day,
-- 
Martijn van Oosterhout   <kleptog@xxxxxxxxx>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment: signature.asc
Description: Digital signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux