X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 0853B476321 for ; Tue, 29 Apr 2003 04:21:27 -0400 (EDT) Received: from news.hub.org (news.hub.org [64.49.215.80]) by postgresql.org (Postfix) with ESMTP id 68C1B47632B for ; Tue, 29 Apr 2003 04:20:51 -0400 (EDT) Received: by news.hub.org (Postfix, from userid 8) id 507CD43A91A; Tue, 29 Apr 2003 04:20:51 -0400 (EDT) Date: Tue, 29 Apr 2003 10:21:01 +0200 From: Martin Brommer User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, nl MIME-Version: 1.0 X-Newsgroups: comp.databases.postgresql.sql Subject: PERFORM / FOUND, what's up? Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Lines: 21 Message-ID: <3eae35d4$0$49113$e4fe514c@news.xs4all.nl> X-Complaints-To: abuse@xs4all.nl To: pgsql-sql@postgresql.org X-Spam-Status: No, hits=-11.6 required=5.0 tests=BAYES_01,NO_DNS_FOR_FROM,USER_AGENT_MOZILLA_UA autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/454 X-Sequence-Number: 13155 Hi, I'm trying to get an answer from a dynamic query using perform. The problem is that it sets the FOUND variable to true even when performing bogus queries. Am I missing something here? The documentation says that PERFORM only sets FOUND to true if it finds and discards a row but doing something like: qry := 'SELECT notafield FROM notatable' PERFORM qry Also sets FOUND to true, even more using a query like 'BLABLABLA' also set found to true. What am I doing wrong here? Thanks for any help in advance, Martin