Re: FW: New function - hostmask

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Cc: greg <greg(dot)wickham(at)grangenet(dot)net>
Subject: Re: FW: New function - hostmask
Date: 2003-03-21 21:52:40
Message-ID: 200303212152.h2LLqe615586@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


I have added this function after confirmation from another user that
this is a function of general value.

I changed the original oid because the original was was already in use.

---------------------------------------------------------------------------

pgman wrote:
>
> Yes, and I emailed you back asking for the purpose of the function. I
> looked in the patch and now see:
>
> + <entry><function>hostmask</function>(<type>inet</type>)</entry>
> + <entry><type>inet</type></entry>
> + <entry>construct hostmask for network</entry>
> + <entry><literal>hostmask('192.168.23.20/30')</literal></entry>
> + <entry><literal>0.0.0.3</literal></entry>
>
> Is this something that is of general value?
>
> ---------------------------------------------------------------------------
>
> greg wrote:
> >
> > Hi Bruce,
> >
> > Apologies for sending this directly to you but I posted a patch last
> > week to the pgsql-patches mailing list.
> >
> > I haven't heard anything back .. Not sure if this was overlooked, or was
> > problematic in a way not familiar to me.
> >
> > Would appreciate a response.
> >
> > Thanks,
> >
> > -Greg
> >
> > --
> > Dr. Greg Wickham GrangeNet Network Operations Manager
> > Phone: +61 2 6222 3552 AARNet Pty Ltd
> > Mob : +61 4 0785 4566 Australian Academic and
> > Email: greg(dot)wickham(at)grangenet(dot)net Research Network
> >
> > -----Original Message-----
> > From: greg [mailto:greg(dot)wickham(at)grangenet(dot)net]
> > Sent: Thursday, February 13, 2003 6:04 PM
> > To: 'pgsql-patches(at)postgresql(dot)org'
> > Subject: New function - hostmask
> >
> >
> >
> > Hi,
> >
> > Have (by necessity) copied and altered the existing 'netmask' function
> > in postgresql to perform 'hostmask' style duties.
> >
> > A diff against v7.3.2 is attached.
> >
> > The patch affects three files:
> >
> > postgresql-7.3.2/doc/src/sgml/func.sgml - Updated list of network
> > functions with a simple example
> > postgresql-7.3.2/src/backend/utils/adt/network.c - The bulk of the new
> > 'hostmask' routine.
> > postgresql-7.3.2/src/include/catalog/pg_proc.h - Addition of function
> > 'hostmask' into pg_proc
> >
> > Note that I arbitrarily chose 2311 as the OID (in pg_proc) as it was
> > unused (although not guaranteed to be the lowest unused value).
> >
> > Would appreciate any feedback on this (first submission to postgresql
> > and all),
> >

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 3.2 KB

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2003-03-22 02:12:40 Re: to_char PL/MI fix
Previous Message Peter Eisentraut 2003-03-21 17:22:21 Re: Forgotten?