Re: Trouble Escaping Quotes - Mailing list pgsql-admin

From Haron, Charles
Subject Re: Trouble Escaping Quotes
Date
Msg-id 593E515C9586D511BB4500010283D5E202564C6F@COG-MAIL
Whole thread Raw
In response to Trouble Escaping Quotes  ("Haron, Charles" <charles.haron@cognitive.com>)
Responses Re: Trouble Escaping Quotes
List pgsql-admin

This the the SQL statement that causes the error:

******
SELECT Problem_Funct(TestTable1) FROM TestTable1 WHERE TestField1 ~*
'Fixit';
******

This is the dump of the "test case":

*******
--
-- PostgreSQL database dump
--

\connect - postgres

SET search_path = public, pg_catalog;

--
-- TOC entry 6 (OID 352064)
-- Name: plpgsql_call_handler (); Type: FUNCTION; Schema: public;
Owner: postgres
--

CREATE FUNCTION plpgsql_call_handler () RETURNS language_handler
     AS '$libdir/plpgsql', 'plpgsql_call_handler'
     LANGUAGE c;


--
-- TOC entry 3 (OID 352065)
-- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: public; Owner:
--

CREATE TRUSTED PROCEDURAL LANGUAGE plpgsql HANDLER plpgsql_call_handler;


--
-- TOC entry 7 (OID 352066)
-- Name: plperl_call_handler (); Type: FUNCTION; Schema: public; Owner:
postgres
--

CREATE FUNCTION plperl_call_handler () RETURNS language_handler
     AS '$libdir/plperl', 'plperl_call_handler'
     LANGUAGE c;


--
-- TOC entry 4 (OID 352067)
-- Name: plperlu; Type: PROCEDURAL LANGUAGE; Schema: public; Owner:
--

CREATE PROCEDURAL LANGUAGE plperlu HANDLER plperl_call_handler;


--
-- TOC entry 5 (OID 352067)
-- Name: plperlu; Type: ACL; Schema: public; Owner:
--

REVOKE ALL ON LANGUAGE plperlu FROM PUBLIC;


--
-- TOC entry 2 (OID 352088)
-- Name: testtable1; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE testtable1 (
     testfield1 character varying(25),
     testfield2 text
);


--
-- TOC entry 8 (OID 352094)
-- Name: problem_funct (testtable1); Type: FUNCTION; Schema: public;
Owner: postgres
--

CREATE FUNCTION problem_funct (testtable1) RETURNS void
     AS '
     use Mail::Sender;
     my ($problem_data) = @_;

     my ($Test1) = $problem_data->{''TestField1''};

'
     LANGUAGE plperlu STABLE;


--
-- Data for TOC entry 9 (OID 352088)
-- Name: testtable1; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY testtable1 (testfield1, testfield2) FROM stdin;
Bob's Fixit     Bob's Problem
\.
*******

BTW, I'm using v7.3.3

> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> Sent: Monday, January 24, 2005 12:14 PM
> To: Haron, Charles
> Cc: pgsql-admin@postgresql.org; Richard Poole
> Subject: Re: [ADMIN] Trouble Escaping Quotes
>
> "Haron, Charles" <charles.haron@cognitive.com> writes:
> > *** Information From <posgresqlhome>/data/serverlog ***
> server closed
> > the connection unexpectedly
> >          This probably means the server terminated abnormally
> >          before or while processing the request.
> > The connection to the server was lost. Attempting reset: WARNING:
> > Message from PostgreSQL backend:
> >          The Postmaster has informed me that some other backend
> >          died abnormally and possibly corrupted shared memory.
>
> Hmm.  That moves it out of the realm of "user error", which
> is what I think we'd all been assuming, and into the realm of
> "server bug".
> Can you supply a self-contained test case that causes this?
> Or at least a debugger back trace from the point of the core dump?
>
>             regards, tom lane
>

***********************

Confidentiality notice:  This electronic transmission message is intended only for the use of the individual or entity
towhom it is addressed.  This information should be treated as proprietary, confidential, legally privileged and exempt
fromdisclosure under applicable law.  If the reader of this message is not the intended recipient, (or the employee or
agentresponsible for delivering the message to the intended recipient), you are hereby notified that any use,
dissemination,distribution, or copying of this message is strictly prohibited.  If you have received this communication
inerror, please immediately notify us by telephone (720) 221-9421 or by return e-mail and delete this message.  Thank
youfor your cooperation. 

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: 7.4.6 pg_dump failed
Next
From: Marty Scholes
Date:
Subject: Re: 7.4.6 pg_dump failed