Re: match an IP address

From: Tino Wildenhain <tino(at)wildenhain(dot)de>
To: Phoenix Kiula <phoenix(dot)kiula(at)gmail(dot)com>
Cc: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>, PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: match an IP address
Date: 2008-09-23 11:43:52
Message-ID: 48D8D678.9070608@wildenhain.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

Phoenix Kiula wrote:
>> Please forgive my attempt to help you based on a woefully insufficient
>> description of your problem and situation. I will not make any attempt to do
>> so again.
>
> To others: thanks for your suggestions, but this issue is not one of
> session IDs, nor is it solved by storing IP addresses separately
> (which does not assume 1:1 correlation between user and IP). We'll let
> that be.
>
> Let's just say that in *many* online situations it is vital for
> querying speed to have the same column that stores users -- both
> registered and unregistered. A query in SQL that matches against an IP

if not registered, where is the user coming from? The IP is clearly not
an identifier for a user. You (and the OP) should disregard that idea.

> address regexp to identify the unregistered ones may work for some
> with smaller databases, which is great, and if it doesn't (the "~"
> match is simply not practical for large busy websites), then consider
> a small separate column that stores the registration status as a flag.

The user id itself would serve as that flag. If non NULL -> user known,
otherwise unknown. Sounds easy, no? No regex at all! :)

> Thanks.
>
Thx ;)

Tino

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Marcus Engene 2008-09-23 11:44:34 Re: match an IP address
Previous Message Phoenix Kiula 2008-09-23 11:16:50 Re: match an IP address