Re: ip of the user doing an insert - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: ip of the user doing an insert
Date
Msg-id 20031129200538.GE16671@dcc.uchile.cl
Whole thread Raw
In response to Re: ip of the user doing an insert  (Randolf Richardson <rr@8x.ca>)
Responses Re: ip of the user doing an insert  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Sat, Nov 29, 2003 at 12:27:37AM +0000, Randolf Richardson wrote:
> > Is there a function or other way to get the user's ip address the moment
> >    an insert is performed?
> > Supposed that many people with the same "pg_username" are conected to
> > the database so no username tracking is usefull.
>
>         If this isn't a feature now, hopefully it will be in the future, but I
> assume it will have to return the address as a string since IPv4 and IPv6 are
> formatted differently.

Why not use the inet type, which can support both formats?

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Ni aun el genio muy grande llegaría muy lejos
si tuviera que sacarlo todo de su propio interior" (Goethe)

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: PostgreSQL, MySQL, etc., was Re: PostgreSQL is much
Next
From: Tom Lane
Date:
Subject: Re: ip of the user doing an insert