Re: Trouble Escaping Quotes

From: "Haron, Charles" <charles(dot)haron(at)cognitive(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Haron, Charles" <charles(dot)haron(at)cognitive(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org, Richard Poole <rp(at)guests(dot)deus(dot)net>
Subject: Re: Trouble Escaping Quotes
Date: 2005-01-26 16:20:57
Message-ID: 593E515C9586D511BB4500010283D5E202564C6F@COG-MAIL
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)sss(dot)pgh(dot)pa(dot)us]
> Sent: Monday, January 24, 2005 12:14 PM
> To: Haron, Charles
> Cc: pgsql-admin(at)postgresql(dot)org; Richard Poole
> Subject: Re: [ADMIN] Trouble Escaping Quotes
>
> "Haron, Charles" <charles(dot)haron(at)cognitive(dot)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 to whom it is addressed. This information should be treated as proprietary, confidential, legally privileged and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, (or the employee or agent responsible 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 in error, please immediately notify us by telephone (720) 221-9421 or by return e-mail and delete this message. Thank you for your cooperation.

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Marty Scholes 2005-01-26 16:32:06 Re: 7.4.6 pg_dump failed
Previous Message Tom Lane 2005-01-26 16:19:35 Re: 7.4.6 pg_dump failed