Re: mapping user name to group name

From: <btober(at)seaworthysys(dot)com>
To: <dev(at)archonet(dot)com>
Cc: <mphillips(at)timing(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: mapping user name to group name
Date: 2003-03-11 13:16:46
Message-ID: 65216.216.238.112.88.1047388606.squirrel@$HOSTNAME
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On Monday 10 Mar 2003 5:47 pm, Matthew Phillips wrote:
>>
>> to map a user name to
>> the group name
>> has its own usesysids within an array of integers. I have no clue how
>> to search within an array using a select statement.
>
> there
> are some array-handling functions in contrib/intarray
>

SELECT
pg_group.groname,
pg_user.usename
FROM pg_user, pg_group
WHERE (pg_group.grolist *= pg_user.usesysid)
ORDER BY pg_group.groname, pg_user.usename;

works for me, after installing the array-handing functions referred to by
Huxton.

~Berend Tober

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Delao, Darryl W 2003-03-11 14:14:57 General Performance questions
Previous Message Magnus Månsson 2003-03-11 13:10:16 commiting in/between functions