Re: How to process inverted comma in "EXECUTE 'insert into xxx values(...) - Mailing list pgsql-sql

From Richard Huxton
Subject Re: How to process inverted comma in "EXECUTE 'insert into xxx values(...)
Date
Msg-id 46495D77.6050108@archonet.com
Whole thread Raw
In response to Re: How to process inverted comma in "EXECUTE 'insert into xxx values(...)  ("Nemo Terry" <ntuser155@hotmail.com>)
Responses Re: How to process inverted comma in "EXECUTE 'insert into xxx values(...)  ("Nemo Terry" <ntuser155@hotmail.com>)
List 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


pgsql-sql by date:

Previous
From: "Nemo Terry"
Date:
Subject: Re: How to process inverted comma in "EXECUTE 'insert into xxx values(...)
Next
From: "Rodrigo De León"
Date:
Subject: Re: How to process inverted comma in "EXECUTE 'insert into xxx values(...)