Re: ip of the user doing an insert

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Randolf Richardson <rr(at)8x(dot)ca>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: ip of the user doing an insert
Date: 2003-11-29 20:05:39
Message-ID: 20031129200538.GE16671@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-11-29 20:46:26 Re: ip of the user doing an insert
Previous Message Alvaro Herrera 2003-11-29 20:04:50 Re: PostgreSQL, MySQL, etc., was Re: PostgreSQL is much