Re: Storing a chain

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Johan Fredrik Øhman <johanfo(at)ohman(dot)no>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Storing a chain
Date: 2003-11-19 16:36:55
Message-ID: 20031119163655.GA19911@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Nov 19, 2003 at 16:08:47 +0100,
Johan Fredrik Øhman <johanfo(at)ohman(dot)no> wrote:
>
> 1) Use a Sequence number in the table. This way it is possible to use ORDER
> BY sequencenumber to retrive the correct list. This works, but you have to
> do some massive updating when you what to insert a rule between i.e "12" and
> "13".

I wouldn't think using a sequence would make much sense. You don't want
automatically generated unique values, you want to impose an order.
If you want easy insertion at the expense of larger indexes you are
probably better off using a text or numeric (using digits to the right
of the decimal point) key.

Why do you want your rules in a database? I would think that a plain
text file would be a better approach unless you either want to be able
to ask questions about your firewall rules or have some automated
system for changing the firewall rules based on contidions (e.g. time of day).

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2003-11-19 16:38:18 Re: Optimizing query
Previous Message Bruce Momjian 2003-11-19 16:35:47 Re: Point-in-time data recovery - v.7.4