pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: tjk@tksoft.com <tjk@tksoft.com>
To: mfork@toledolink.com
Cc: pgsql-sql@postgresql.org
Subject: Re: User/Groups
Date: Mon, 3 Apr 2000 16:07:16 -0700 (PDT)
Message-ID: <200004032307.QAA22392@uno.tksoft.com> (raw)
In-Reply-To: <Pine.BSI.4.21.0004031714001.23790-100000@glass.toledolink.com>

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
> 
> 




view thread (4+ messages)  latest in thread

Message-ID: <200004032307.QAA22392@uno.tksoft.com>
Permalink:  ../200004032307.QAA22392@uno.tksoft.com/
Also on:    postgresql.org/message-id/200004032307.QAA22392@uno.tksoft.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: tjk@tksoft.com, mfork@toledolink.com
  Subject: Re: User/Groups
  In-Reply-To: <200004032307.QAA22392@uno.tksoft.com>
  References: <Pine.BSI.4.21.0004031714001.23790-100000@glass.toledolink.com> <200004032307.QAA22392@uno.tksoft.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox