Re: Per-server univocal identifier
| От | Tom Lane |
|---|---|
| Тема | Re: Per-server univocal identifier |
| Дата | |
| Msg-id | 24530.1150585967@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Per-server univocal identifier ("Giampaolo Tomassoni" <g.tomassoni@libero.it>) |
| Ответы |
R: Per-server univocal identifier
|
| Список | pgsql-hackers |
"Giampaolo Tomassoni" <g.tomassoni@libero.it> writes:
> I'm looking for a way to univocally identify the server on which a sql function or statement is running. My idea
wouldbe something close to the value returned by a 'host -f' under linux: the FQDN of the host, but even a serial code
ora 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
В списке pgsql-hackers по дате отправления: