X-Original-To: pgsql-sql@postgresql.org Received: from pd3mo1so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net [24.71.223.10]) by postgresql.org (Postfix) with ESMTP id 3869A4762A2 for ; Tue, 11 Mar 2003 22:31:29 -0500 (EST) Received: from pd4mr3so.prod.shaw.ca (pd4mr3so-qfe3.prod.shaw.ca [10.0.141.214]) by l-daemon (iPlanet Messaging Server 5.1 HotFix 0.8 (built May 12 2002)) with ESMTP id <0HBM00NFB9SL12@l-daemon> for pgsql-sql@postgresql.org; Tue, 11 Mar 2003 20:31:33 -0700 (MST) Received: from pn2ml4so.prod.shaw.ca (pn2ml4so-qfe0.prod.shaw.ca [10.0.121.148]) by l-daemon (iPlanet Messaging Server 5.1 HotFix 0.6 (built Apr 26 2002)) with ESMTP id <0HBM00IIK9SL7G@l-daemon> for pgsql-sql@postgresql.org; Tue, 11 Mar 2003 20:31:33 -0700 (MST) Received: from kimiko (h24-78-132-76.vc.shawcable.net [24.78.132.76]) by l-daemon (iPlanet Messaging Server 5.1 HotFix 0.8 (built May 12 2002)) with SMTP id <0HBM00L229SKV7@l-daemon> for pgsql-sql@postgresql.org; Tue, 11 Mar 2003 20:31:33 -0700 (MST) Date: Tue, 11 Mar 2003 19:28:53 -0800 From: Vernon Wu Subject: Re: Special characters in SQL queries In-reply-to: <3E6E0191.B8F06EBB@rodos.fzk.de> To: pgsql-sql@postgresql.org, Christoph Haller Reply-To: vernonw@gatewaytech.com Message-id: MIME-version: 1.0 X-Mailer: Opera 6.05 build 1140 Content-type: text/plain; charset=iso-8859-2 Content-transfer-encoding: 7BIT X-Priority: 3 (Normal) X-Archive-Number: 200303/270 X-Sequence-Number: 12310 Thank Christoph for your information. I don't program in C at all, but Java. Although I can make a way to call the C library function from Java, it isn't suitable solution, I believe. I only desire to find out all the type of characters at the present time so that I can strip out any potential problem sources in text. Who know what characters a user will enter. Vernon 11/03/2003 7:32:33 AM, Christoph Haller wrote: >> >> First a single quote in text, when a backforward slash in a file path, >what other special characters need padded in t >wo >> backslashes before using the data in a SQL statement? >> >> After hours' search in the PostgreSQL archive, I find a releted >information on the http://www.ca.postgresql.org/users >- >> lounge/docs/7.2/postgres/arrays.html. It's about array data though. >> >> How can I find out those characters so that I can pre-process them >before a SQL query? >> >What about >size_t PQescapeString (char *to, const char *from, size_t length); >from the libpq - C Library? > >Regards, Christoph > > >