pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Victor Yegorov <viy@pirmabanka.lv>
To: pgsql-sql@postgresql.org
Subject: Re: Special characters in SQL queries
Date: Wed, 12 Mar 2003 08:44:19 +0200
Message-ID: <20030312064419.GG3791@pirmabanka.lv> (raw)
In-Reply-To: <WTXVVUJGX3286IDIG87B697UXR87BA.3e6ea975@kimiko>
References: <3E6E0191.B8F06EBB@rodos.fzk.de>
	<WTXVVUJGX3286IDIG87B697UXR87BA.3e6ea975@kimiko>

* Vernon Wu <vernonw@gatewaytech.com> [12.03.2003 05:36]:
> 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.
> 

Take a look at the source code of PQescapeString() in the source
distribution of postgres. I hope, you'll find all the chars you're
interested in.

> >>
> >> 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);



-- 

Victor Yegorov

view thread (7+ messages)  latest in thread

Message-ID: <20030312064419.GG3791@pirmabanka.lv>
Permalink:  ../20030312064419.GG3791@pirmabanka.lv/
Also on:    postgresql.org/message-id/20030312064419.GG3791@pirmabanka.lv

 · 

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-sql@postgresql.org
  Cc: viy@pirmabanka.lv
  Subject: Re: Special characters in SQL queries
  In-Reply-To: <20030312064419.GG3791@pirmabanka.lv>

* 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