Received: from btclick.com (mta02.btfusion.com [62.172.195.247]) by postgresql.org (8.11.6/8.11.4) with ESMTP id g1KIrDF82595 for ; Wed, 20 Feb 2002 13:53:13 -0500 (EST) (envelope-from graham@digitalplanit.com) Received: from [213.120.146.245] ([213.120.146.245]) by btclick.com (Netscape Messaging Server 4.15) with SMTP id GRUHSO04.NYB for ; Wed, 20 Feb 2002 18:53:12 +0000 From: "Graham Vickrage" To: Subject: Re: SQL For smarties Date: Wed, 20 Feb 2002 18:55:51 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" 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) In-Reply-To: <3C7281ED.357E495E@trade-india.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Archive-Number: 200202/256 X-Sequence-Number: 6680 I am trying to create tables from within a funtion i.e. create function _tree_create(text) retuns int as ' begin; create table $1_tree (....); return 1; end; ... select _tree_create('item'); An error message refering to $1 gets thrown up. Is this not possible to do or is there another way of doing it? Thanks in advance. Graham