Re: inet_client_addr() implementation - Mailing list pgsql-general

From Magnus Hagander
Subject Re: inet_client_addr() implementation
Date
Msg-id 20070405130500.GG19736@svr2.hagander.net
Whole thread Raw
In response to inet_client_addr() implementation  ("J. ORIOL" <famach@yahoo.com>)
Responses Re: inet_client_addr() implementation  ("J. ORIOL" <famach@yahoo.com>)
Help!! Crash recovery  (Jaime Silvela <JSilvela@Bear.com>)
List pgsql-general
On Thu, Apr 05, 2007 at 07:57:41AM -0500, J. ORIOL wrote:
> Hello,
>
> I was in the archives, looking for some concrete info about inet_client_addr() use, but only a C function found.
>
> I have some clients to my app. (PG 8.2 in XP LAN). I want to generate auto-logs with trigger function for every table
andfor every event, but I cannot include clint ip address yet. 
>
> When the triggers starts and execute  SELECT  inet_client_addr(), will retrieve client's ip ?? or just 127.0.0.1

It should return the clients IP.

(If you're using say a web-ap, that will be 127.0.0.1, since it can't know
where the browser is. But if the client does a direct connection to the
database, it should return it)

//Magnus


pgsql-general by date:

Previous
From: "J. ORIOL"
Date:
Subject: inet_client_addr() implementation
Next
From: "Woody Woodring"
Date:
Subject: Print database name