Re: Lost - one sequence

From: "Brian Johnson" <bjohnson(at)jecinc(dot)on(dot)ca>
To: "Brian Johnson" <bjohnson(at)jecinc(dot)on(dot)ca>, pgsql-novice(at)postgresql(dot)org
Subject: Re: Lost - one sequence
Date: 2003-01-08 04:52:33
Message-ID: 20030107.jP3.10720700@192.168.0.1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

This worked:

CREATE SEQUENCE phpgw_ttrack_job__job_id_seq START 245;

ALTER TABLE phpgw_ttrack_jobs
ALTER job_id SET DEFAULT nextval('phpgw_ttrack_job__job_id_seq');

Brian Johnson (bjohnson(at)jecinc(dot)on(dot)ca) wrote*:
>
>Somehow one of my tables lost the sequence that was auto-incrementing the job_id
>field
>
>Can someone tell me how to recreate it, relink it (if necessary), and reset it's
>number to one more than the highest number in that field?
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: if posting/reading through Usenet, please send an appropriate
>subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
>message can get through to the mailing list cleanly
>

Browse pgsql-novice by date

  From Date Subject
Next Message Alan Gutierrez 2003-01-08 09:34:17 Re: SQL list table names
Previous Message Brian Johnson 2003-01-08 04:22:06 Lost - one sequence