Re: BUG #16628: Hostame and string connection functions

Поиск
Список
Период
Сортировка
От Anderson Antunes
Тема Re: BUG #16628: Hostame and string connection functions
Дата
Msg-id CAAHHTi_NSDorzEG1jq7A3BpRo3QLH8vymrofjQEA-Gv34AKx6Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #16628: Hostame and string connection functions  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: BUG #16628: Hostame and string connection functions
Список pgsql-bugs
I'm sorry for not responding earlier. She ended up falling into spam. I solved it by creating a specific variable in the postgresql configuration file.

If it's not too much trouble, I have another question: my name is Anderson Antunes. I live in Brazil. I'm doing research for a master's project about pseudo random numbers and would like to know more information about the random() function used to randomly order a set of records. I tried to search through the site that offers the source code but I couldn't identify the exact implementation of this function. 

image.png
image.png

Can you help me?




Em qui., 24 de set. de 2020 às 18:07, Bruce Momjian <bruce@momjian.us> escreveu:
On Tue, Sep 22, 2020 at 06:57:13PM +0000, PG Bug reporting form wrote:
> The following bug has been logged on the website:
>
> Bug reference:      16628
> Logged by:          Anderson Antunes
> Email address:      anderson.ant.oli@gmail.com
> PostgreSQL version: 9.5.0
> Operating system:   Linux
> Description:       
>
> Hi,
>
> Is there any possibility of developing a function to retrieve hostname and
> the connection string?
>
> Example:
>
> select get_host_name ();

You can get the server IP address, but not the host name:

        test=> SELECT inet_server_addr();
         inet_server_addr
        ------------------
         127.0.0.1

> select get_string_connection ();

Uh, the connection information is parsed by libpq, and visible in psql:

        test=> \conninfo You are connected to database "test" as user
                "postgres" on host "localhost" (address "127.0.0.1")
                at port "5432".

but the server only sees the result.  You can see the server port
number:

        test=> SELECT inet_server_port();
         inet_server_port
        ------------------
                     5432

I can't figure out how to query the SSL mode via SQL.  Does this help?

--
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

  The usefulness of a cup is in its emptiness, Bruce Lee



--
Atenciosamente,
Anderson Antunes
Bento Gonçalves
(53) 9142-2910
Вложения

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

Предыдущее
От: Nathan Bossart
Дата:
Сообщение: Re: BUG #17903: There is a bug in the KeepLogSeg()
Следующее
От: Alexander Korotkov
Дата:
Сообщение: Re: BUG #17847: Unaligned memory access in ltree_gist