All, In the pg_dump output is the command: COPY event_tbl (d1, ..., evt_id) FROM stdin; followed by all the data for the table. There are 23040 rows. The last value for evt_id is 23040. So far so good. Then the last statement in the pg_dump output is: SELECT pg_catalog.setval('event_tbl_evt_id_seq', 21232, true); I'm guessing this is my culprit. But this dump is from the client site. Short of somebody mucking with the sequence manually, is there any way that the sequence number could get changed? As I've said, our insert commands are very simple and we do not specify 'evt_id' values directly. Does anybody have any ideas about how this could have gotten out of sync? thanks, Bill --- Alvaro Herrera <alvherre@xxxxxxxxxxxxx> wrote: > On Tue, Apr 12, 2005 at 08:48:15AM -0700, Bill > Chandler wrote: > > > How does one find out the current sequence value? > Is > > there a way to change it? > > Using the function setval() you can change it. > SELECT * from > sequencename to find out. > > -- > Alvaro Herrera (<alvherre[@]dcc.uchile.cl>) > "Si quieres ser creativo, aprende el arte de perder > el tiempo" > __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo@xxxxxxxxxxxxxx)