X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 79E05D1B4EC for ; Wed, 17 Sep 2003 21:51:36 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 08434-08 for ; Wed, 17 Sep 2003 18:51:07 -0300 (ADT) Received: from ninthwonder.com (canolog.ninthwonder.com [151.199.66.142]) by svr1.postgresql.org (Postfix) with SMTP id 1BA79D1B4FC for ; Wed, 17 Sep 2003 18:51:04 -0300 (ADT) Received: (qmail 7596 invoked from network); 17 Sep 2003 21:50:57 -0000 Received: from localhost (HELO idocs.com) (127.0.0.1) by localhost with SMTP; 17 Sep 2003 21:50:57 -0000 From: "Miko O Sullivan" To: Tom Lane , miko@idocs.com (Miko O'Sullivan) Cc: pgsql-sql@postgresql.org Subject: Need more examples (was "session variable") Date: Wed, 17 Sep 2003 17:50:57 -0400 Message-Id: <20030917214228.M75792@idocs.com> In-Reply-To: <5999.1063833785@sss.pgh.pa.us> References: <200309032042.h83KgmJ24665@candle.pha.pa.us> <5999.1063833785@sss.pgh.pa.us> X-Mailer: MissionDog 0.10 20030909 X-OriginatingIP: 68.70.50.112 (miko) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/234 X-Sequence-Number: 15212 On Wed, 17 Sep 2003 17:23:05 -0400, Tom Lane wrote > miko@idocs.com (Miko O'Sullivan) writes: > > Unfortunately in the 7.2.x version I have available, EXECUTE does not > > allow "select into". The docs suggests a technique for using a FOR > > loop to extract information from an EXECUTE, but the technique only > > works for finite set of expected variables, not for arbitrary values. > > How do you figure that? AFAICS "FOR" with a record variable as > target will cover any case that SELECT INTO could handle. Tom: I don't "figure" it, it's just all I could get from documentation and discussion that is rather sparse in concrete examples. For example, this thread includes two postings that indicate that session variables can be done, and make references to commands, but fail to actually show how to do them. The documentation is the same way. The one example for FOR loops is confusing and overly broad. It fail to step through the example code clearly showing where a value from a temp table is extracted and stored in a variable. I certainly don't mean to be critical, because PostGres is a fantastic product. However, we in the open source community need to learn that software is only as good as its documentation. Concrete examples are the heart of good technical documentation. I would go so far to say that any technical documentation w/o simple concrete examples demonstrating each point is at best a quarter as useful as it might be. I guess I should live by my own words, so for concrete examples of concrete examples, please see any of the pages in the Idocs Guide to HTML. There are links at http://www.idocs.com. -Miko Miko O'Sullivan Programmer Analyst Rescue Mission of Roanoke