Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 28825476678 for ; Mon, 14 Oct 2002 10:50:40 -0400 (EDT) Received: from relay.flex.ro (ns.flex.ro [193.230.255.2]) by postgresql.org (Postfix) with ESMTP id 7C6EA476674 for ; Mon, 14 Oct 2002 10:50:39 -0400 (EDT) Received: from flex.ro (teo.flex.ro [193.230.255.11]) by relay.flex.ro (Postfix) with ESMTP id 7C9BF1B520; Mon, 14 Oct 2002 17:50:43 +0300 (EEST) Message-ID: <3DAAD9C5.3000700@flex.ro> Date: Mon, 14 Oct 2002 17:50:45 +0300 From: Constantin Teodorescu User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tom Lane Cc: PostgreSQL Interfaces Subject: Re: What's wrong in this pltcl function ? References: <3DAA8ADB.6060208@flex.ro> <12147.1034605407@sss.pgh.pa.us> <3DAAD536.8030603@flex.ro> <12329.1034606693@sss.pgh.pa.us> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/38 X-Sequence-Number: 3200 Tom Lane wrote: >Constantin Teodorescu writes: > > >>I have replaced: >>... where id=\'\\$1\' >> with >>... where id=\\$1 >> >> > > > >>and the error is now: >>ERROR: Unable to identify an operator '=$' for types 'character >>varying' and 'integer' >> >> > >Wup, you needed a space: > > ... where id = \\$1 > >BTW, if id is varchar it would be better to define the function as >accepting varchar not bpchar, no? > > Yes, I changed it as varchar the function parameter and the query parameter! Now it works even with 2 backslashes like this: ... from conturi where id = \\$1" [list varchar] teo