X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id ABFA1D942F for ; Sat, 24 Sep 2005 16:51:01 -0300 (ADT) 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 54600-06 for ; Sat, 24 Sep 2005 19:50:58 +0000 (GMT) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by svr1.postgresql.org (Postfix) with ESMTP id B88A7D942E for ; Sat, 24 Sep 2005 16:50:58 -0300 (ADT) Received: from root by ciao.gmane.org with local (Exim 4.43) id 1EJG2G-0000tP-38 for pgsql-sql@postgresql.org; Sat, 24 Sep 2005 21:50:12 +0200 Received: from c-67-171-26-134.hsd1.wa.comcast.net ([67.171.26.134]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 24 Sep 2005 21:50:12 +0200 Received: from ceremona by c-67-171-26-134.hsd1.wa.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 24 Sep 2005 21:50:12 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-sql@postgresql.org From: ceremona@gmail.com Subject: stored procs in postgresql Date: Sat, 24 Sep 2005 12:30:58 -0700 Lines: 25 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15 Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: c-67-171-26-134.hsd1.wa.comcast.net User-Agent: Opera M2/8.5 (MacPPC, build 2173) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.178 required=5 tests=[NO_REAL_NAME=0.178] X-Spam-Level: X-Archive-Number: 200509/243 X-Sequence-Number: 22790 Hi, I have been having some trouble with plsql stored procs in postgres in = that I can make a table name a variable in the stored proc. Is there some special = = way to make this happen that I am unaware of? For example, I want to do something like: stored_proc(integer,varchar) SELECT table_name.id FROM table_name $2 WHERE table_name.id=3D$1 but I get an error about the $2 argument being no good. Does anyone know how I can deal with this? Thanks, Cere