From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Giampaolo Tomassoni" <g(dot)tomassoni(at)libero(dot)it> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Per-server univocal identifier |
Date: | 2006-06-17 23:12:47 |
Message-ID: | 24530.1150585967@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"Giampaolo Tomassoni" <g(dot)tomassoni(at)libero(dot)it> writes:
> I'm looking for a way to univocally identify the server on which a sql function or statement is running. My idea would be something close to the value returned by a 'host -f' under linux: the FQDN of the host, but even a serial code or a number would be fine to me. It needs only to be immutable, I guess.
Perhaps inet_server_addr() and inet_server_port() would answer. These
aren't super-useful on local connections, however.
How "immutable" do you want it to be exactly? The system_identifier
embedded in pg_control might be interesting if you want something that
will change at initdb. I don't think there's a way to look at that from
SQL but you could write a C function to access it.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Giampaolo Tomassoni | 2006-06-17 23:26:21 | R: Per-server univocal identifier |
Previous Message | Giampaolo Tomassoni | 2006-06-17 22:27:16 | Per-server univocal identifier |