From: | "Nemo Terry" <ntuser155(at)hotmail(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: How to process inverted comma in "EXECUTE 'insert into xxx values(...) |
Date: | 2007-05-15 07:42:47 |
Message-ID: | BAY19-F20DF994D619E22D574463AF53D0@phx.gbl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
quote_literal() works.Thanks a lot!
>From: Richard Huxton <dev(at)archonet(dot)com>
>To: Nemo Terry <ntuser155(at)hotmail(dot)com>
>CC: pgsql-sql(at)postgresql(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Gary Stainburn | 2007-05-15 08:51:34 | workday function |
Previous Message | Rodrigo De León | 2007-05-15 07:14:57 | Re: How to process inverted comma in "EXECUTE 'insert into xxx values(...) |