[freeside-users] duplicate key violates unique constraint "cust_main_pkey"

Vlad Sedov stereomind at gmail.com
Wed Sep 5 15:33:36 PDT 2007


sweet! that is what I needed.

Thanks, Ivan.

BTW, any gotchas for upgrading from 1.7.0 to 1.7.2 or current snapshot?

-Vlad



On 9/5/07, Ivan Kohler <ivan at sisd.com> wrote:
>
> Take a look at bin/sequences.reset, it sets each primary key sequence to
> the current
> highest value in the table.
>
> (SQL syntax is something like: SELECT SETVAL('sequence_name', value);
>
> --
> _ivan
>
>
> On Wed, Sep 05, 2007 at 12:24:51PM -0500, Vlad Sedov wrote:
> > hey folks....
> >
> >
> > long time without problems. here's what I've got today:
> >
> >
> > duplicate key violates unique constraint "cust_main_pkey"
> >
> >
> > I understand what the error means and what's causing it - somehow the
> next
> > value of the cust_main_custnum_seq bumps into an existing custnum. Is it
> > possible to "reset" the sequence's next value to an arbitrary number? I
> > don't know postgres well enough to figure it out.
> >
> >
> > FS 1.7.0, apache 1.3, postgres 8.1.4
> >
> >
> >
> > Vlad
>
> > _______________________________________________
> > freeside-users mailing list
> > freeside-users at sisd.com
> > http://420.am/cgi-bin/mailman/listinfo/freeside-users
>
>
> --
> _ivan
> _______________________________________________
> freeside-users mailing list
> freeside-users at sisd.com
> http://420.am/cgi-bin/mailman/listinfo/freeside-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://420.am/pipermail/freeside-users/attachments/20070905/0850b6be/attachment.htm 


More information about the freeside-users mailing list