PostgreSQL - Mailing list pgsql-general

From Horaci Cuevas
Subject PostgreSQL
Date
Msg-id NABBJFCKFCOHFBNGLGHOAEGDCDAA.hcuevas@perti.com
Whole thread Raw
List pgsql-general
Hi!

    I'm using PostgreSQL for a search-web based database, and i saw a missing
    function mostly found in DB2 and others, where, you can get results from
    a query having a WHERE condition to exist or not in another SQL sentence .

    In DB2 is:

        SELECT field1, field2 FROM tab1 WHERE field1 IN ( select field3 from tab2 )
    or
        SELECT field1, field2 FROM tab1 where field1 NOT IN ( select field3 from tab2 )

    PostgreSQL already has that, but only allows to return 1 result, ex:

        SELECT field1, field2 FROM tab1 where field1 =
            ( select field 3 from tab2 where id=1 )

    Would be great if that where added to the TODO as a future Feature.

Thanks in Advance.
Horaci Cuevas.


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Re: [GENERAL] drop/rename table and transactions
Next
From: "Mike Mascari"
Date:
Subject: Re: [HACKERS] Re: [GENERAL] drop/rename table and transactions