SELECT Question

From: Alex <alex(at)meerkatsoft(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: SELECT Question
Date: 2003-11-20 07:22:14
Message-ID: 3FBC6BA6.6070709@meerkatsoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-patches

Hi,
I have a column with a sequence in a table and want to allocate the
first 200 for special purpose thus starting the sequence from 200. For
the first 200 I have entries that will be added and removed.

Is there an easy way to write a select statement that returns me the
frist free number or any within the range of 200?
For example if 1-30, and 32-50 are occupied then i would like to fill in
the new entry with id 31.
I currently do it with a function but I was just wondering if there is a
way without it..

Thanks
Alex

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stef 2003-11-20 07:29:41 Re: Point-in-time data recovery - v.7.4
Previous Message Mark Parker 2003-11-20 06:55:06 another newbie question: PLEASE HELP!

Browse pgsql-patches by date

  From Date Subject
Next Message Lada 'Ray' Lostak 2003-11-20 07:32:58 Re: SELECT Question
Previous Message Hans-Jürgen Schönig 2003-11-20 07:09:00 Re: Add GUC setting to make created tables default to