From: | Doug McNaught <doug(at)wireboard(dot)com> |
---|---|
To: | "Mihai Gheorghiu" <tanethq(at)earthlink(dot)net> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Special characters |
Date: | 2001-08-17 15:23:14 |
Message-ID: | m38zgipv6l.fsf@belphigor.mcnaught.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
"Mihai Gheorghiu" <tanethq(at)earthlink(dot)net> writes:
> Yet another newbie question...
> The database I'm working on will have fields with special characters: CR/LF,
> ' (like in O'Malley) etc.
> Is there an easy way to deal with this (in INSERT, UPDATE and SELECT), or
> should the front end application (Java) take care of escaping those
> characters?
If you use PreparedStatements, the JDBC driver will quote and escape
the arguments appropriately. If you don't, and build your SQL on the
fly, you'll have to do it yourself.
-Doug
--
Free Dmitry Sklyarov!
http://www.freesklyarov.org/
We will return to our regularly scheduled signature shortly.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-08-17 15:23:47 | Re: assigning result of SELECT in TRIGGER |
Previous Message | Nilesh Kumar Jain | 2001-08-17 15:12:35 | Querry optimisation in Postgres SQL |