Re: User/Groups

From: "tjk(at)tksoft(dot)com" <tjk(at)tksoft(dot)com>
To: mfork(at)toledolink(dot)com (Michael Fork)
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: User/Groups
Date: 2000-04-03 23:07:16
Message-ID: 200004032307.QAA22392@uno.tksoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Michael,

The IN operator should precede a sub query.

E.g.

SELECT usename FROM pg_user, pg_group WHERE pg_group.grosysid = 1 and
pg_user.usesysid IN (select usesysid from pg_group);

This probably doesn't do what you want. The example is just to
demonstrate the point.

Troy

>
> I am trying to populate a select box on a form with all users in the group
> with the sysid of 1 using the following query:
>
> SELECT usename FROM pg_user, pg_group WHERE pg_user.usesysid IN
> pg_group.grolist AND pg_group.grosysid = 1;
>
> however, everytime I run it I recieve the following error:
>
> ERROR: parser: parse error at or near "pg_group"
>
> which leads me to belive that the IN operator is not correct, is there
> another one that I should be using? Thanks in advance.
>
> Michael Fork - CCNA - MCP - A+
> Network Support - Toledo Internet Access - Toledo Ohio
>
>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Jeffrey Curran 2000-04-03 23:31:00 set digest
Previous Message Tom Lane 2000-04-03 21:33:09 Re: Hash Indexes. (Was: planner complaints)