By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,179 Members | 970 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,179 IT Pros & Developers. It's quick & easy.

ip of the user doing an insert

P: n/a
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.
Thanks in advance

Alexander Antonakakis

Nov 12 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
> 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.

--
Randolf Richardson - rr@8x.ca
Vancouver, British Columbia, Canada

Please do not eMail me directly when responding
to my postings in the newsgroups.
Nov 12 '05 #2

P: n/a
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)

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 12 '05 #3

P: n/a
Alvaro Herrera <al******@dcc.uchile.cl> writes:
Why not use the inet type, which can support both formats?


What will you do with local Unix connections?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 12 '05 #4

P: n/a
[sNip]
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?


I probably should have rambled on a little bit there -- in summary I
was thinking of facilitating other protocols as well, such as IPX/SPX, and
who-knows-what-else gets invented in the future.

At least if a generic string type is used instead, then no assumptions
are being made which require research (and Tom already pointed out that local
Unix connections will probably be an issue with the "inet" type), thus less
work is required now to support whatever comes along in the future (or that
has been missed in this conversation).

--
Randolf Richardson - rr@8x.ca
Vancouver, British Columbia, Canada

Please do not eMail me directly when responding
to my postings in the newsgroups.
Nov 12 '05 #5

P: n/a
On Sat, 2003-11-29 at 20:46, Tom Lane wrote:
Alvaro Herrera <al******@dcc.uchile.cl> writes:
Why not use the inet type, which can support both formats?


What will you do with local Unix connections?


Why not use 127.0.0.1 or the ipv6 equivalent.

--
Suchandra Thapa <s-********@alumni.uchicago.edu>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQA/yTx46nShCjt5AZIRAllAAJ0eavFH2BV/90C8Wd0LJKY0+gE8fACeLGpd
JCVR0+TE5DPBSErRWMUF59s=
=fp1L
-----END PGP SIGNATURE-----

Nov 12 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.