Re: What's wrong in this pltcl function ?

From: Constantin Teodorescu <teo(at)flex(dot)ro>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: What's wrong in this pltcl function ?
Date: 2002-10-14 14:50:45
Message-ID: 3DAAD9C5.3000700@flex.ro
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Tom Lane wrote:

>Constantin Teodorescu <teo(at)flex(dot)ro> 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

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Constantin Teodorescu 2002-10-14 16:12:10 GD global data array capabilities in pltcl
Previous Message Tom Lane 2002-10-14 14:44:53 Re: What's wrong in this pltcl function ?