Обсуждение: Server Status Activity grid
<div class="WordSection1"><p class="MsoNormal">Hi Group,<p class="MsoNormal"> <p class="MsoNormal">I think I’ve asked thisquestion before a long time ago but I’m hoping to get a different answer this time. :D<p class="MsoNormal"> <p class="MsoNormal">InpgAdmin III - 1.16.1, on the Server Status screen, the Activity grid lists current database connections.<pclass="MsoNormal"> <p class="MsoNormal">The Application name column very clearly lists pgAdmin III connections,which is great, but if my application also has an active connection or two or three, the Application name columnis blank. <p class="MsoNormal"> <p class="MsoNormal">My question is, where is the Application name column pullingits data from? A PostgreSQL catalog table? A parameter? Dark magic? I would like to see that the connection comesfrom my app in the grid, as opposed to some other source.<p class="MsoNormal"> <p class="MsoNormal">Thanks,<p class="MsoNormal"> <pclass="MsoNormal">Chris<p class="MsoNormal"> </div>
Chris Campbell-14 wrote > My question is, where is the Application name column pulling its data > from? http://www.postgresql.org/docs/9.2/interactive/runtime-config-logging.html Section 18.8.3 "application_name" Issue a: SET application_name = 'my_application'; command upon establishing a connection. Probably can setup this on a per-user basis if desired. David J. -- View this message in context: http://postgresql.1045698.n5.nabble.com/Server-Status-Activity-grid-tp5768874p5768875.html Sent from the PostgreSQL - pgadmin support mailing list archive at Nabble.com.
> Chris Campbell-14 wrote > > My question is, where is the Application name column pulling its data > > from? > > http://www.postgresql.org/docs/9.2/interactive/runtime-config- > logging.html > > Section 18.8.3 > > "application_name" > > Issue a: > > SET application_name = 'my_application'; > > command upon establishing a connection. Probably can setup this on a > per-user basis if desired. > > David J. > Hi David. Thank you for your reply. I'm developing in a .net environment and for posterity purposes will document the methodI used thanks to your suggestion. I use a 3rd party component called dotConnect for PostgreSQL (From Devart) for mydata connection. string strAppName = "MyApp"; string strCurrentUser = "CurrentUser"; oCommand = mydataconnection.CreateCommand; oCommand.CommandText = "set application_name = '" + strAppName + "-" + strCurrentUser + "'"; oCommand.ExecuteNonQuery(); Looking at the answer now I suppose it would have been more appropriate to post this question in a different forum, but sinceI spotted what I wanted in pgAdmin it made sense to me to start here. FYI, I use pgAdmin daily and am grateful for all the hard work you people put into it. Thanks again, Chris