From: Justin Clift <aa2@bigpond.net.au>
To: Najm Hashmi <najm@mondo-live.com>
Cc: pgsql <pgsql-sql@postgresql.org>
Subject: Re: quotes in pl/pgsql
Date: Thu, 08 Mar 2001 11:37:54 +1100
Message-ID: <3AA6D462.BE90DA40@bigpond.net.au> (raw)
References: <3AA80DAE.2DF3F902@mondo-live.com>
Hi Najm,
Is this what you mean?
CREATE FUNCTION foobar(int4) returns int4
as 'DECLARE
textbuf varchar(120);
BEGIN
textbuf := ''Example Text '';
insert into sometable (something) values (textbuf);
RETURN 0;
END;'
LANGUAGE 'plpgsql';
Najm Hashmi wrote:
>
> Hi all, I just want to know how to put quotes around a string. Is there a
> function to do so?
> If not how can I escape a single quote.
> Thank you in advance.
>
> ------------------------------------------------------------------------
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: aa2@bigpond.net.au, najm@mondo-live.com
Subject: Re: quotes in pl/pgsql
In-Reply-To: <3AA6D462.BE90DA40@bigpond.net.au>
References: <3AA80DAE.2DF3F902@mondo-live.com> <3AA6D462.BE90DA40@bigpond.net.au>
* 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