Re: Obtaining client IP address

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: Obtaining client IP address
Дата
Msg-id 20060224233427.GA12772@winnie.fuhr.org
обсуждение исходный текст
Ответ на Obtaining client IP address  (Alexis Paul Bertolini <bertolini@computer.org>)
Ответы Re: Obtaining client IP address  (Alexis Paul Bertolini <bertolini@computer.org>)
Список pgsql-sql
On Sat, Feb 25, 2006 at 12:16:31AM +0100, Alexis Paul Bertolini wrote:
> The client has no idea what public IP it has. The server ought to 
> know... however I haven't found how I could get this info into my query.

What version of PostgreSQL are you running?  In 8.0 and later you
can use inet_client_addr().

http://www.postgresql.org/docs/8.1/interactive/functions-info.html

I forget if earlier versions have a way to get the client's IP
address without resorting to hacks (e.g., writing a function in a
privileged language like plperlu and calling netstat or lsof).

-- 
Michael Fuhr


В списке pgsql-sql по дате отправления:

Предыдущее
От: Alexis Paul Bertolini
Дата:
Сообщение: Obtaining client IP address
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: CREATE TABLE AS and tablespaces