From: Oleg Lebedev <olebedev@waterford.org>
To: Stephan Szabo <sszabo@megazone23.bigpanda.com>
Cc: Marat Khairullin <xmm@rambler.ru>
Cc: pgsql-sql@postgresql.org
Subject: Quotes and spaces
Date: Fri, 05 Oct 2001 16:28:26 -0600
Message-ID: <3BBE340A.B8788CAE@waterford.org> (raw)
References: <Pine.BSF.4.21.0110051147090.62592-100000@megazone23.bigpanda.com>
Hi,
I looked through PL/pgSQL tutorial, but I can't get quotes and spaces to
work in queries executed from Pl/pgSQl. Here is an example:
create procedure get_name(varchar)
...
BEGIN
query := ''SELECT first_name || '''' '''' || last_name FROM user'';
EXECUTE query;
...
END;
...
Basically I want to get full name, i.e. first name separated with space from
the last name. If I follow the PL/pgSQL manual as shown above, I get parse
error.
What am I doing wrong?
thanks,
Oleg
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: olebedev@waterford.org, sszabo@megazone23.bigpanda.com, xmm@rambler.ru
Subject: Re: Quotes and spaces
In-Reply-To: <3BBE340A.B8788CAE@waterford.org>
* 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