Re: escape character in a function - Mailing list pgsql-novice

From Henshall, Stuart - WCP
Subject Re: escape character in a function
Date
Msg-id E2870D8CE1CCD311BAF50008C71EDE8E01F7485F@MAIL_EXCHANGE
Whole thread Raw
In response to escape character in a function  ("Patrick Hatcher" <PHatcher@macys.com>)
Responses pg_setlocale()
List pgsql-novice
Try doubleing the apostraphe again, ie:
 set div_name = ''RICH''''S''
Cheers,
- Stuart

> -----Original Message-----
> From: Patrick Hatcher [mailto:PHatcher@macys.com]
> Sent: 23 April 2002 22:26
> To: pgsql-novice@postgresql.org
> Subject: [NOVICE] escape character in a function
>
>
> Howdy
> How do I do an escape character in a function to for a word
> that has an
> apostrophe like: RICH'S.  I tried ''RICH\'S'', but when I run
> my function,
> I get back mismatch parentheses.
> TIA
>
> REATE FUNCTION "sp_updaterlg"() RETURNS "int4" AS '
> begin
>   update bcp_cust
>   set div_name = ''RICH\'S''
>    where
>    div_store is not null
>    and instr(div_store,''RICH\'S'',1) >0;
>
>   return 1;
> end;
> ' LANGUAGE 'plpgsql';
>
> Patrick Hatcher
> Macys.Com
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>

pgsql-novice by date:

Previous
From: "Henshall, Stuart - WCP"
Date:
Subject: Re: Storing .jpg files
Next
From: Torbjörn Andersson
Date:
Subject: pg_setlocale()