diff options
author | Mark Wong <markwkm@gmail.com> | 2007-09-19 17:44:30 -0700 |
---|---|---|
committer | Mark Wong <markwkm@gmail.com> | 2007-09-19 17:44:30 -0700 |
commit | dec71b2173fb6096e61b62737b77591439010d71 (patch) | |
tree | 04e94f67e0a6ed33a16af7b028c01b26965ae110 /commands.c | |
parent | 9c1d13a8753164e8026a91f2f5097f4fc516b608 (diff) |
Fixed the query to get locks held by a process and fixed the minimum
size of the column widths so the headers line up with the following data
when the data is smaller than the headers.
Diffstat (limited to 'commands.c')
-rw-r--r-- | commands.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -82,6 +82,7 @@ static char *err_listem = "SELECT datname, relname, mode, granted\n" \ "FROM pg_stat_activity, pg_locks, pg_class\n" \ "WHERE procpid = %d\n" \ + " AND procpid = pid\n" \ " AND pg_class.oid = relation;" /* @@ -537,7 +538,7 @@ show_locks(PGconn *pgconn, int procpid) int rows; char *sql; char info[64]; - int width[5] = {0, 0, 0, 0, 0}; + int width[5] = {1, 8, 5, 4, 7}; PGresult *pgresult; char *header_format; char *line_format; |