Re: \du in psql patchp

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Alex Perel <aperel(at)verticalscope(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: \du in psql patchp
Date: 2001-05-09 16:57:50
Message-ID: 200105091657.f49GvoW11071@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


Patch applied. I removed the reference to asprintf() and changed it to
a string constant. I have also added documentation changes. Patch
attached.

The new feature looks like:

test=> \du
List of Users
User Name | User ID | Attributes
-----------+---------+------------------------
demouser2 | 140 | create DB
postgres | 139 | create user, create DB

Very nice.

> Hi everyone,
>
> I quickly put together a patch to psql that allows one to view current
> system users. The code is very simple, but it seems to work.
>
> The usage is as follows:
>
> database=# \du [username]
>
> I apologize in advance for my lack of C skills, and I will gladly
> accept any criticism or advice. I'm hoping I can figure out a way
> to write an equivalent for groups, once I determine how to
> get around the grolist integer[] column in pg_group.
>
> Please take a look at the patch and see if it's worth anything.
>
> Thanks
>
> Alex
>
>
> Alex G. Perel -=- AP5081
> veers(at)disturbed(dot)net -=- aperel(at)verticalscope(dot)com
> play -=- work
>
> Disturbed Networks - Powered exclusively by FreeBSD
> == The Power to Serve -=- http://www.freebsd.org/

Content-Description:

[ Attachment, skipping... ]

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

Attachment Content-Type Size
unknown_filename text/plain 4.6 KB

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Peter Eisentraut 2001-05-09 17:45:59 Re: \du in psql patchp
Previous Message D'Arcy J.M. Cain 2001-05-09 09:50:16 Changes needed to build on NetBSD