pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Sequence
2+ messages / 2 participants
[nested] [flat]

* Sequence
@ 2001-01-03 08:04 anson <anson@gigaideas.com.cn>
  2001-01-03 16:53 ` Re: Sequence Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: anson @ 2001-01-03 08:04 UTC (permalink / raw)
  To: pgsql-docs

Hello,
i have some problem with the Sequence of pgsql.
for example:
    i have made a talbe named tbl_a and his sequence named
    tbl_a_log_id_seq, then i insert into tbl_a with amounts of
    records, so the last value of tbl_a_log_id_seq become 200.
    someday, i get this table move to a new machine, create a new
    table, a new sequence, so there becomes the problem!
    i cann't insert a new record into tbl_a when there are old records
    in the table, because the log_id has become from 1 to 200, but the
    last_value of tbl_a_log_id_seq is 1!!!!!and i even can't change
    the value of last_value, how can i do now? i don't wanna lose the
    old records!
    please help me!
  

-- 
Best regards,
 anson                          mailto:anson@gigaideas.com.cn





^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Sequence
  2001-01-03 08:04 Sequence anson <anson@gigaideas.com.cn>
@ 2001-01-03 16:53 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2001-01-03 16:53 UTC (permalink / raw)
  To: anson <anson@gigaideas.com.cn>; +Cc: pgsql-docs

Do
	SELECT setval('tbl_a_log_id_seq', 201);

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2001-01-03 16:53 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-01-03 08:04 Sequence anson <anson@gigaideas.com.cn>
2001-01-03 16:53 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox