X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 8A36453C91 for ; Thu, 24 Feb 2005 17:11:03 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 18036-03 for ; Thu, 24 Feb 2005 17:10:55 +0000 (GMT) Received: from fed1rmmtao03.cox.net (fed1rmmtao03.cox.net [68.230.241.36]) by svr1.postgresql.org (Postfix) with ESMTP id 856DC556EA for ; Thu, 24 Feb 2005 17:10:53 +0000 (GMT) Received: from dnd2 ([68.2.114.10]) by fed1rmmtao03.cox.net (InterMail vM.6.01.04.00 201-2131-118-20041027) with ESMTP id <20050224171104.SLTD1282.fed1rmmtao03.cox.net@dnd2>; Thu, 24 Feb 2005 12:11:04 -0500 From: "Steve - DND" To: "Richard Huxton" Cc: Subject: Re: Junk queries with variables? Date: Thu, 24 Feb 2005 10:11:04 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 In-Reply-To: <421D8F0B.1060409@archonet.com> Importance: Normal X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200502/312 X-Sequence-Number: 20422 > Michael's given you one option - another to look at is PREPARE/EXECUTE > PREPARE my_query(int4) AS INSERT INTO foo VALUES ($1); > EXECUTE my_query(1); > EXECUTE my_query(7); > ... This doesn't seem to be quite what I'm looking for. PREPARE according to the docs is for a one line statement. I'm looking for the ability to do multiple operations, basically using it for general DB queries that aren't really needed more than once. This again comes from my MSSQL background where you can go to town and just start writing out TSQL to do one off queries. Thanks, Steve