Re: libpq: Add PQapplicationname() function

From: Japin Li <japinli(at)hotmail(dot)com>
To: "songjinzhou" <tsinghualucky912(at)foxmail(dot)com>
Cc: "pgsql-hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: libpq: Add PQapplicationname() function
Date: 2025-04-29 15:13:35
Message-ID: ME0P300MB04457EA03DCB62C5CD4F8F2AB6802@ME0P300MB0445.AUSP300.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 29 Apr 2025 at 19:22, "songjinzhou" <tsinghualucky912(at)foxmail(dot)com> wrote:
> Dear hackers, here is a libpq function: PQapplicationname(), I think it may be of some use.
>
> Looking forward to your reply, thank you.
>

I believe the use cases for this are narrow.

Generally, clients set the application_name and then don't need to
retrieve it. Its primary use seems to be on the server-side, for
monitoring through pg_stat_activity.

Could you explain your use case?

Assuming we do require this functionality, should we then also consider
the interplay between application_name and fallback_application_name?
Additionally, if a SET application_name TO xxx command is issued during
a subsequent connection, will the appname field within the PGconn structure
be updated promptly?

--
Regrads,
Japin Li

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-04-29 15:16:59 Re: What's our minimum supported Python version?
Previous Message David E. Wheeler 2025-04-29 15:12:02 Re: extension_control_path and "directory"