Default libpq application name

Started by Bruce Momjianabout 16 years ago2 messageshackers
Jump to latest
#1Bruce Momjian
bruce@momjian.us

I just emailed Dave Page and it seems we don't set a default application
name in libpq. Should we do:

extern char *argv[];

and reference argv[0] in libpq to set a default application name?

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

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#1)
Re: Default libpq application name

Bruce Momjian <bruce@momjian.us> writes:

I just emailed Dave Page and it seems we don't set a default application
name in libpq. Should we do:
extern char *argv[];
and reference argv[0] in libpq to set a default application name?

No. This is not portable and it's not a good idea even if it were.

The issue was discussed extensively when the patch was committed,
and does not need to be revisited now.

regards, tom lane