Re: inet-type sequence

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: inet-type sequence
Дата
Msg-id 20050129224122.GC14571@wolff.to
обсуждение исходный текст
Ответ на inet-type sequence  ("Andrey V. Semyonov" <wilfre@mail.ru>)
Список pgsql-general
On Sat, Jan 29, 2005 at 22:24:46 +0300,
  "Andrey V. Semyonov" <wilfre@mail.ru> wrote:
> Hi there.
> How do I create a sequence of type inet for automatic assignment an
> IP/32 to a new row?
> Neither nextval() nor CREATE SEQUENCE seem for me to work with type inet
> (PostgreSQL 8.0.0, pgAdmin III v 1.2.0).

Unless you have a huge net block, you probably don't want to use a sequence
like object anyway. You are going to want some way to reuse previous IP
addresses that have been released.

Having a table of usable IP addresses with a flag indicating which are in
use might be a practical solution for you if the block(s) of addresses
isn't too big.

В списке pgsql-general по дате отправления:

Предыдущее
От: Thomas Hallgren
Дата:
Сообщение: Re: Moving from Sybase to PostgreSQL - Stored Procedures
Следующее
От: William Yu
Дата:
Сообщение: Re: Splitting queries across servers