Skip site navigation (1) Skip section navigation (2)

Re: Simple search question

From: Alex <gliathit(at)ihug(dot)com(dot)au>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Simple search question
Date: 2000-06-15 06:55:15
Message-ID: 39487DD3.7F2BBAE1@ihug.com.au (view raw or flat)
Thread:
Lists: pgsql-sql
Hi,

> I had the same problem but was using Java, not PHP (I guess that
> whatever I can do in JDBC, you can do in PHP ;-)).
>
> SELECT last_value FROM <sequence>;

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?
Thanks,
Alex


In response to

Responses

pgsql-sql by date

Next:From: Karel ZakDate: 2000-06-15 16:37:04
Subject: ANNOUNCE: pg_dumplo 0.0.5
Previous:From: Bernie HuangDate: 2000-06-14 21:05:45
Subject: inheritance and primary key

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group