Re: Adding a pg_servername() function

2023-08-10 Thread Laetitia Avrot
Dear Christoph, Please find my answers below. Le mer. 9 août 2023 à 22:05, Christoph Moench-Tegeder a écrit : > ## GF (phab...@gmail.com): > > And now that I checked it: I do have systems with gethostname() > returning an FQDN, and other systems return the (short) hostname > only. The return

Re: Adding a pg_servername() function

2023-08-10 Thread Laetitia Avrot
Dear Tom, Thank you for your interest in that patch and for taking the time to point out several things that need to be better. Please find below my answers. Le mer. 9 août 2023 à 16:04, Tom Lane a écrit : > I actually do object to this, because I think the concept of "server > name" is extreme

Re: Adding a pg_servername() function

2023-08-10 Thread Laetitia Avrot
Le mer. 9 août 2023 à 17:32, GF a écrit : > > Would it be less problematic if the function were called pg_gethostname()? > @Laetitia: why did you propose that name? maybe to avoid clashes with some > extension out there? > > I used that name to be kind of coherent with the inet_server_addr(), but

Re: Adding a pg_servername() function

2023-08-08 Thread Laetitia Avrot
Dear all, First, thank you so much for your interest in this patch. I didn't think I would have so many answers. I agree that the feature I'm suggesting could be done with a few tricks. I meant to simplify the life of the user by providing a simple new feature. (Also, I might have trust issues wi

Re: Adding a pg_servername() function

2023-08-04 Thread Laetitia Avrot
Le jeu. 3 août 2023 à 15:17, Christoph Moench-Tegeder a écrit : > ## Laetitia Avrot (laetitia.av...@gmail.com): > > > For my customer, their use case is to be able from an SQL client to > double > > check they're on the right host before doing things that could become

Re: Adding a pg_servername() function

2023-08-03 Thread Laetitia Avrot
Le jeu. 3 août 2023 à 14:20, <066ce...@free.fr> a écrit : > > > > Agreed, depending on how hosts and dns are set, it can be useless. > > But normally, companies have host making standards to avoid that. > > > BTW you already have it : > > select setting from pg_settings where name = 'listen_addres

Re: Adding a pg_servername() function

2023-08-03 Thread Laetitia Avrot
Le jeu. 3 août 2023, 11:31, Matthias van de Meent < boekewurm+postg...@gmail.com> a écrit : > On Thu, 3 Aug 2023 at 10:37, Laetitia Avrot > wrote: > > > > Dear Hackers, > > > > One of my customers suggested creating a function that could return the &g

Adding a pg_servername() function

2023-08-03 Thread Laetitia Avrot
Dear Hackers, One of my customers suggested creating a function that could return the server's hostname. After a quick search, we found [this Wiki page]( https://wiki.postgresql.org/wiki/Pg_gethostname) referring to [that extension](https://github.com/theory/pg-hostname/) from David E. Wheeler.

Authorizing select count()

2022-05-25 Thread Laetitia Avrot
Hello, Vik Fearing pointed out the inconsistency in the SQL Standard that imposes using count(*) (with a star) but row)number() without it. Vik's point of view is that we should be able to use row_number with a star, which is already implemented in Postgres. My point of view is we could add supp

Re: pg_dump new feature: exporting functions only. Bad or good idea ?

2022-04-07 Thread Laetitia Avrot
Le jeu. 7 avr. 2022, 07:43, Michael Paquier a écrit : > > Looks clear to me that a different design is wanted here, and that > this won't make it for v15, so I have marked the patch as returned > with feedback in the CF app. > > Hello, I agree with Michael, this won't be ready for PG15. I had pl

Re: pg_dump new feature: exporting functions only. Bad or good idea ?

2022-03-26 Thread Laetitia Avrot
Hello all, Le sam. 26 mars 2022 à 01:13, Michael Paquier a écrit : > On Fri, Mar 25, 2022 at 10:09:33PM +0100, Daniel Gustafsson wrote: > > Agreed. In this case it seems that adding --exclude-extension would > make sense > > to keep conistency. I took a quick stab at doing so with the attached

Re: Re: pg_dump new feature: exporting functions only. Bad or good idea ?

2022-03-25 Thread Laetitia Avrot
Hello David, thank you for your interest in that patch. Le ven. 25 mars 2022 à 01:17, David G. Johnston a écrit : > On Thu, Mar 24, 2022 at 4:42 PM Chapman Flack > wrote: > >> On 03/27/21 08:57, Andrew Dunstan wrote: >> > We can bikeshed the name of the flag at some stage. --procedures-only >>

Re: Re: pg_dump new feature: exporting functions only. Bad or good idea ?

2022-03-25 Thread Laetitia Avrot
Hello Chapman, Le ven. 25 mars 2022 à 00:42, Chapman Flack a écrit : > On 03/27/21 08:57, Andrew Dunstan wrote: > > We can bikeshed the name of the flag at some stage. --procedures-only > > might also make sense > > Any takers for --routines-only ? > > "Routine" is the genuine, ISO SQL umbrella

Re: pg_dump new feature: exporting functions only. Bad or good idea ?

2022-03-25 Thread Laetitia Avrot
Hello Tom, Le ven. 25 mars 2022 à 00:18, Tom Lane a écrit : > Daniel Gustafsson writes: > >> On 24 Mar 2022, at 23:38, Greg Stark wrote: > >> It looks like this discussion has reached a bit of an impasse with Tom > >> being against this approach and Michael and Daniel being for it. It > >> doe

Re: pg_dump new feature: exporting functions only. Bad or good idea ?

2022-03-25 Thread Laetitia Avrot
Hello Michael, Le mar. 25 janv. 2022 à 06:49, Michael Paquier a écrit : > On Tue, Nov 09, 2021 at 03:23:07PM +0100, Daniel Gustafsson wrote: > > Looking at this thread I think it makes sense to go ahead with this > patch. The > > filter functionality worked on in another thread is dealing with