psql: \dg off by one error

Started by Josh Kupershmidtabout 15 years ago2 messageshackers
Jump to latest
#1Josh Kupershmidt
schmiddy@gmail.com

Hi all,

I noticed an off by one error in psql's verbose-mode display for \dg
and \du. In verbose mode, \dg and \du will not display the
"Replication" attribute:

test=# \dg rep
List of roles
Role name | Attributes | Member of
-----------+-------------+-----------
rep | Replication | {}

test=# \dg+ rep
List of roles
Role name | Attributes | Member of | Description
-----------+------------+-----------+-------------
rep | | {} |

Attached is a one line patch to fix.

Josh

Attachments:

psql_replication_display.patchtext/x-patch; charset=US-ASCII; name=psql_replication_display.patchDownload+2-2
#2Magnus Hagander
magnus@hagander.net
In reply to: Josh Kupershmidt (#1)
Re: psql: \dg off by one error

On Sun, Feb 27, 2011 at 01:21, Josh Kupershmidt <schmiddy@gmail.com> wrote:

Hi all,

I noticed an off by one error in psql's verbose-mode display for \dg
and \du. In verbose mode, \dg and \du will not display the
"Replication" attribute:

test=# \dg rep
           List of roles
 Role name | Attributes  | Member of
-----------+-------------+-----------
 rep       | Replication | {}

test=# \dg+ rep
                 List of roles
 Role name | Attributes | Member of | Description
-----------+------------+-----------+-------------
 rep       |            | {}        |

Attached is a one line patch to fix.

Applied, thanks.

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/