Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-interfaces by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group