From: John R Pierce <pierce@hogranch.com>
To: pgsql-general@postgresql.org
Subject: Re: SQL Question
Date: Tue, 01 Apr 2014 13:56:23 -0700
Message-ID: <533B27F7.4040608@hogranch.com> (raw)
In-Reply-To: <CAAXGW-z5ONU0sJANwntVKBtMTSs4YXK6oQkjpZygDcmz4GjYew@mail.gmail.com>
References: <CAAXGW-yohFpLePLw7aDEwtG7S1zSBFNmseb-L9+mn8KgWf-Ayw@mail.gmail.com>
<CAAXGW-z5ONU0sJANwntVKBtMTSs4YXK6oQkjpZygDcmz4GjYew@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>
On 4/1/2014 1:27 PM, Robert DiFalco wrote:
> Heh, scratch that, the EXISTS query DOES work. Is this the most
> efficient way to perform this kind of query? Thanks!
I would try and express that as a left outer join, and use (c2.owner_id
IS NOT NULL) as your boolean field (or something like that)
--
john r pierce 37N 122W
somewhere on the middle of the left coast
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
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-general@postgresql.org
Cc: pierce@hogranch.com
Subject: Re: SQL Question
In-Reply-To: <533B27F7.4040608@hogranch.com>
References: <CAAXGW-yohFpLePLw7aDEwtG7S1zSBFNmseb-L9+mn8KgWf-Ayw@mail.gmail.com> <CAAXGW-z5ONU0sJANwntVKBtMTSs4YXK6oQkjpZygDcmz4GjYew@mail.gmail.com> <533B27F7.4040608@hogranch.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