pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nemo Terry <ntuser155@hotmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: How to process inverted comma in "EXECUTE 'insert into xxx values(...)
Date: Tue, 15 May 2007 15:42:47 +0800
Message-ID: <BAY19-F20DF994D619E22D574463AF53D0@phx.gbl> (raw)
In-Reply-To: <46495D77.6050108@archonet.com>

quote_literal() works.Thanks a lot!


>From: Richard Huxton <dev@archonet.com>
>To: Nemo Terry <ntuser155@hotmail.com>
>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 




view thread (6+ messages)

Message-ID: <BAY19-F20DF994D619E22D574463AF53D0@phx.gbl>
Permalink:  ../BAY19-F20DF994D619E22D574463AF53D0@phx.gbl/
Also on:    postgresql.org/message-id/BAY19-F20DF994D619E22D574463AF53D0@phx.gbl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: ntuser155@hotmail.com
  Subject: Re: How to process inverted comma in "EXECUTE 'insert into xxx values(...)
  In-Reply-To: <BAY19-F20DF994D619E22D574463AF53D0@phx.gbl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox