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 4921A3A5F25 for ; Thu, 27 Jan 2005 17:13:49 +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 86217-06 for ; Thu, 27 Jan 2005 17:13:43 +0000 (GMT) Received: from anchor-post-33.mail.demon.net (anchor-post-33.mail.demon.net [194.217.242.91]) by svr1.postgresql.org (Postfix) with ESMTP id 19C0F3A5EE2 for ; Thu, 27 Jan 2005 17:13:43 +0000 (GMT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-33.mail.demon.net with esmtp (Exim 4.42) id 1CuDDC-000JPg-BK; Thu, 27 Jan 2005 17:13:42 +0000 Received: from [192.168.1.17] (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 3919F16506; Thu, 27 Jan 2005 17:13:41 +0000 (GMT) Message-ID: <41F92145.40603@archonet.com> Date: Thu, 27 Jan 2005 17:13:41 +0000 From: Richard Huxton User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Wilton Cc: pgsql-sql@postgresql.org Subject: Re: Function Doubt References: <41F9259A.2080402@microwork.inf.br> In-Reply-To: <41F9259A.2080402@microwork.inf.br> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.069 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200501/299 X-Sequence-Number: 20087 Wilton wrote: > StrCampo = ''new.'' || qCampos.attname; > StrInsert = StrInsert || virgula || StrCampo || '' - ''; > End Loop; > > Return new; > End; > > What i need to do for the variable StrCampo returns to me "SP", "RJ", i > mean, return a value inserted into the field. > I do not want to use static command new.campo1, new.campo2.... Ah - you can't. Not in plpgsql, anyway. You should perhaps look at pltcl or plperl. -- Richard Huxton Archonet Ltd