Received: from femail42.sdc1.sfba.home.com (femail42.sdc1.sfba.home.com [24.254.60.36]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f92GBNn95690 for ; Tue, 2 Oct 2001 12:11:23 -0400 (EDT) (envelope-from kway@overtone.org) Received: from bean.overtone.org ([24.249.254.100]) by femail42.sdc1.sfba.home.com (InterMail vM.4.01.03.20 201-229-121-120-20010223) with ESMTP id <20011002161123.QPNY24406.femail42.sdc1.sfba.home.com@bean.overtone.org> for ; Tue, 2 Oct 2001 09:11:23 -0700 Received: by bean.overtone.org (Postfix, from userid 1001) id CC2365B488; Tue, 2 Oct 2001 16:11:21 +0000 (GMT) Date: Tue, 2 Oct 2001 16:11:21 +0000 From: Kevin Way To: pgsql-sql@postgresql.org Subject: aggregate functions, COUNT Message-ID: <20011002161121.A8772@bean.overtone.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-Archive-Number: 200110/21 X-Sequence-Number: 4976 I'm currently using a SELECT count(*) when all I really want to know is if 1 or more records exist. Is there a standard way to just find out if a record exists? If not, is there a way to avoid iterating over all the records by writing an aggregate function? Given what I've read of how they work, I don't see how to make the function return before parsing all the results anyway, am I wrong here? Thanks for any help, or 2x4s, Kevin Way -- Kevin Way http://www.overtone.org/