Re: Re: Simple search question

From: "Stephan Szabo" <sszabo(at)kick(dot)com>
To: "Alex" <gliathit(at)ihug(dot)com(dot)au>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Re: Simple search question
Date: 2000-06-15 19:09:39
Message-ID: 00d801bfd6fd$41344dc0$0c64010a@kick.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> This brings me back to another unanswered question recently posted
up,maybe
> it is impossible...
> I declared a new table with one of the types as serial (which is really
just a
> sort of macro I believe, which automates the creation of a few things for
your
> convenience), which initialises the last_value of the relation (the
sequence
> itself), as 1. Therefore, upon INSERTing my first row, the serial number
began
> at 1, next was 2, then 3, and so forth.
> My question is, is it possible to alter the sequence last_value column,
as
> I need the serial number to begin from 1000?

select setval(sequencename, value); should set the sequence as if value was
the last value given out in the sequence.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Patrick Coulombe 2000-06-15 20:10:36 find the number of rows for each table
Previous Message DalTech - Continuing Technical Education 2000-06-15 18:38:35 Does anyone know of a function equivilant to Oracle's decode function?