Re: Quoting routines in libpq

From: Denis Perchine <dyp(at)perchine(dot)com>
To: Vince Vielhaber <vev(at)michvhf(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Quoting routines in libpq
Date: 2000-07-18 05:12:09
Message-ID: 0007181213430M.06956@dyp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> > > Just a small question: why there is not any quoting routine in libpq.
> >
> > Can you give an example of what it should do?
>
> Just as a guess, something that parses a string and escapes single quotes,
> backslashes and stuff like that. I rolled my own for apps that I worked
> on that needed one, lately I've been using PHP which has such a function
> and a reversing function.

You are perfectly right!!! :-)))) Problem is that for each database you should escape
their own set of chars. And also there are lots of escaping types. Like some DBs
prefer to escape single quote as two single quotes, some as slash and single quote.

--
Sincerely Yours,
Denis Perchine

----------------------------------
E-Mail: dyp(at)perchine(dot)com
HomePage: http://www.perchine.com/dyp/
FidoNet: 2:5000/120.5
----------------------------------

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Steve Heaven 2000-07-18 07:48:59 Re: ordering of 'where' sub clauses
Previous Message John McKown 2000-07-18 02:54:06 Re: MOD