Skip to content

Commit

Permalink
Add setting of application_name GUC to slonik
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Browne committed Dec 10, 2010
1 parent a2d97d9 commit bbe9a3f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/slonik/dbutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,17 @@ db_connect(SlonikStmt * stmt, SlonikAdmInfo * adminfo)
* ----
*/
return db_commit_xact(stmt, adminfo);

dstring_init(&query);
slon_mkquery(&query,"SET application_name TO 'slon'; ");

adminfo->dbconn = dbconn;
if (db_exec_command(stmt, adminfo, &query) < 0)
{
printf("Unable to set application name (yet?)\n");
}
dstring_free(&query);

}


Expand Down

0 comments on commit bbe9a3f

Please sign in to comment.