pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Luis Miguel Castañeda <lmc@interlink.es>
To: pgsql-sql@postgresql.org
Subject: Re: problems with single quotes..
Date: Tue, 8 Jan 2002 01:21:58 +0100
Message-ID: <B0001893457@correoserver.interlink.es> (raw)
In-Reply-To: <003401c07687$8631ff60$0301a8c0@klanomega.com>
References: <20011201182212.R74581-100000@megazone23.bigpanda.com>
	<20011202073819.28521.qmail@gnumed.dhs.org>
	<003401c07687$8631ff60$0301a8c0@klanomega.com>

El Thursday 04 January 2001 08:50, Megalex escribió:

> i already tried escaping it.. but the problem is
> with the singlequote-backslash-singlequote combinations..

I use something like this, and works fine for me:

create function quote(text) 
   returns text
   as '
   DECLARE
        quote text;
   BEGIN
        quote := ichar(39); -- quote
        return quote  || $1 || quote;
   END;' 
   language 'plpgsql'; 

-- 
Saludos, lmc@nova.es
_________________________________________________________________
I've lost my faith in nihilism



view thread (12+ messages)

Message-ID: <B0001893457@correoserver.interlink.es>
Permalink:  ../B0001893457@correoserver.interlink.es/
Also on:    postgresql.org/message-id/B0001893457@correoserver.interlink.es

 · 

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: lmc@interlink.es
  Subject: Re: problems with single quotes..
  In-Reply-To: <B0001893457@correoserver.interlink.es>

* 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