Re: How to process inverted comma in "EXECUTE 'insert into xxx values(...)

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: How to process inverted comma in "EXECUTE 'insert into xxx values(...)
Date: 2007-05-15 07:12:55
Message-ID: 46495D77.6050108@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Rodrigo De León 2007-05-15 07:14:57 Re: How to process inverted comma in "EXECUTE 'insert into xxx values(...)
Previous Message Nemo Terry 2007-05-15 06:50:17 Re: How to process inverted comma in "EXECUTE 'insert into xxx values(...)