X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 231B4D1BABD for ; Tue, 9 Mar 2004 06:27:38 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 29280-05 for ; Tue, 9 Mar 2004 02:27:35 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 4CF49D1DAC4 for ; Tue, 9 Mar 2004 02:27:34 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i296RXkQ021340; Tue, 9 Mar 2004 01:27:34 -0500 (EST) To: email_daniel_h@yahoo.com.br Cc: pgsql-sql@postgresql.org Subject: Re: Help to simplify sample query In-reply-to: <404D5920.40104@yahoo.com.br> References: <404D5920.40104@yahoo.com.br> Comments: In-reply-to Daniel Henrique Alves Lima message dated "Tue, 09 Mar 2004 02:41:52 -0300" Date: Tue, 09 Mar 2004 01:27:33 -0500 Message-ID: <21339.1078813653@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/75 X-Sequence-Number: 17174 Daniel Henrique Alves Lima writes: > I don't think this is possible, but: Is there a efficient way to > compare if the result of a query is a superset of the result of another ? Perhaps do "SELECT foo EXCEPT SELECT bar" and see if you get anything? regards, tom lane