X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 3A86ED1DAB0 for ; Tue, 17 Feb 2004 19:26:59 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 98817-07 for ; Tue, 17 Feb 2004 15:26:55 -0400 (AST) Received: from anchor-post-31.mail.demon.net (anchor-post-31.mail.demon.net [194.217.242.89]) by svr1.postgresql.org (Postfix) with ESMTP id CC6ECD1B49E for ; Tue, 17 Feb 2004 15:26:38 -0400 (AST) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-31.mail.demon.net with esmtp (Exim 3.35 #1) id 1AtAre-0004p5-0V; Tue, 17 Feb 2004 19:26:38 +0000 Received: by mainbox.archonet.com (Postfix, from userid 529) id D484E163B8; Tue, 17 Feb 2004 19:26:37 +0000 (GMT) Received: from client17.archonet.com (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id F3EFF15A59; Tue, 17 Feb 2004 19:26:35 +0000 (GMT) From: Richard Huxton To: , Subject: Re: FW: Function Date: Tue, 17 Feb 2004 19:26:35 +0000 User-Agent: KMail/1.5 References: <00e601c3f564$2dca6740$2a154d0a@apac.cisco.com> In-Reply-To: <00e601c3f564$2dca6740$2a154d0a@apac.cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200402171926.35935.dev@archonet.com> X-Bogosity: No, tests=bogofilter, spamicity=0.000000, version=0.15.3 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/227 X-Sequence-Number: 16917 On Tuesday 17 February 2004 14:41, Sumita Biswas (sbiswas) wrote: > Is there nothing like SET NOCOUNT ON; in plpgsql What is this supposed to do for you? > Is there any option like SET ANSI_NULLS ON in plpgsql. What is this supposed to do for you too? > Do we append # before the temp table names in plpgsql, like we do for > MSSQL ? In case no how do we create a temp table in a function in plsql? The thing to remember with plpgsql is that it's compiled (unlike say plTcl). This means that it translates table-names etc. into oids. So what you have to be careful of is referring to a temporary table that is created, destroyed an re-created (because it's oid will change). The solution is to use the EXECUTE command to build a dynamic query. Check the archives for plenty of other people doing this. -- Richard Huxton Archonet Ltd