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 22B13D1E960 for ; Fri, 7 May 2004 11:16:58 -0300 (ADT) 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 91167-01 for ; Fri, 7 May 2004 11:16:40 -0300 (ADT) Received: from atrtnet.hu (fw.i-trade.hu [212.92.1.62]) by svr1.postgresql.org (Postfix) with SMTP id 7445AD1E9AD for ; Fri, 7 May 2004 11:16:35 -0300 (ADT) Received: (qmail 16923 invoked from network); 7 May 2004 13:55:53 -0000 Received: from unknown (HELO freemail.hu) (212.92.7.130) by 0 with SMTP; 7 May 2004 13:55:53 -0000 Message-ID: <409B9AEC.1080302@freemail.hu> Date: Fri, 07 May 2004 16:19:24 +0200 From: =?ISO-8859-2?Q?Suller_Andr=E1s?= User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) X-Accept-Language: hu, en-us MIME-Version: 1.0 To: Freddy Villalba Arias Cc: pgsql-sql@postgresql.org Subject: Re: COUNT on a DISTINCT query References: <92EFB0BEDD24E9419E2CD9A2BD35DAEA0438A7@bmsrv001.madrid.bilbomatica.es> In-Reply-To: <92EFB0BEDD24E9419E2CD9A2BD35DAEA0438A7@bmsrv001.madrid.bilbomatica.es> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.3 tagged_above=0.0 required=5.0 tests=UPPERCASE_25_50 X-Spam-Level: X-Archive-Number: 200405/73 X-Sequence-Number: 17787 > SELECT COUNT(xxx.*) FROM () xxx This cause an error for me: ERROR: cannot pass result of subquery or join "xxx" to a function Try this instead: SELECT COUNT(*) FROM () xxx It worked for me. Regards, Suller Andras