Re: libpq: Add PQapplicationname() function

David G. Johnston <david.g.johnston@gmail.com>

From: "David G. Johnston" <david.g.johnston@gmail.com>
To: songjinzhou <tsinghualucky912@foxmail.com>
Cc: pgsql-hackers <pgsql-hackers@lists.postgresql.org>, Japin Li <japinli@hotmail.com>
Date: 2025-04-29T15:27:05Z
Lists: pgsql-hackers
On Tuesday, April 29, 2025, songjinzhou <tsinghualucky912@foxmail.com>
wrote:

> Dear hackers, here is a libpq function: PQapplicationname(), I think it
> may be of some use.
>

You really should provide at least one reasoned use case for why this
should exist.


>
> Looking forward to your reply, thank you.
>
>
This isn’t even the correct code to use for this.  PQparameterStatus is
where you’d access application_name.  I don’t see a good reason in
providing multiple ways to get access to the same data value.

David J.