On Tue, Jan 17, 2006 at 04:20:23PM +0900, Michael Glaesemann wrote:
> On Jan 18, 2006, at 7:21 , Christian Paul B. Cosinas wrote:
> >Can anyone give me a list of characters that needs to be preceded
> >by an escape character before inserting to database.
>
> Take a look at this documentation on string constants. It should
> answer the questions you have.
> http://www.postgresql.org/docs/current/interactive/sql-syntax.html#SQL-SYNTAX-STRINGS
Out of curiosity, why are you asking? Unless you're implementing
some low-level interface to the database you shouldn't need to worry
about escaping strings; just use your API's quote/escape (or whatever)
function or its placeholder mechanism (if it has one). If you're
using an interface that doesn't have any of these capabilities, what
is it? Some people might want to avoid it ;-)
--
Michael Fuhr