pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Constantin Teodorescu <teo@flex.ro>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Interfaces <pgsql-interfaces@postgresql.org>
Subject: Re: What's wrong in this pltcl function ?
Date: Mon, 14 Oct 2002 17:50:45 +0300
Message-ID: <3DAAD9C5.3000700@flex.ro> (raw)
References: <3DAA8ADB.6060208@flex.ro>
	<12147.1034605407@sss.pgh.pa.us>
	<3DAAD536.8030603@flex.ro>
	<12329.1034606693@sss.pgh.pa.us>

Tom Lane wrote:

>Constantin Teodorescu <teo@flex.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





view thread (8+ messages)

Message-ID: <3DAAD9C5.3000700@flex.ro>
Permalink:  ../3DAAD9C5.3000700@flex.ro/
Also on:    postgresql.org/message-id/3DAAD9C5.3000700@flex.ro

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: teo@flex.ro, tgl@sss.pgh.pa.us
  Subject: Re: What's wrong in this pltcl function ?
  In-Reply-To: <3DAAD9C5.3000700@flex.ro>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox