quote_literal() works.Thanks a lot!
From: Richard Huxton <[EMAIL PROTECTED]>
To: Nemo Terry <[EMAIL PROTECTED]>
CC: pgsql-sql@postgresql.org
Subject: Re: [SQL] How to process inverted comma in "EXECUTE 'insert into xxx
values(...)
Date: Tue, 15 May 2007 08:12:55 +0100
Nemo Terry wrote:
> But I must use it in function,so...
> Do you have another solution?
>>> because obj_name from another table has value like this:S'pore High
>>> Polymer.
>>> Following error raises:
>>> ERROR: syntax error at or near "pore"
You'll want to look into the quote_ident() and quote_literal() functions
when constructing queries like this.
See functions and operators / string functions for details.
--
Richard Huxton
Archonet Ltd
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com
---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at
http://www.postgresql.org/about/donate