Search Postgresql Archives

Re: inet-type sequence

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jan 29, 2005 at 22:24:46 +0300,
  "Andrey V. Semyonov" <wilfre@xxxxxxx> 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.

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux