From: | Oleg Lebedev <olebedev(at)waterford(dot)org> |
---|---|
To: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
Cc: | Marat Khairullin <xmm(at)rambler(dot)ru>, pgsql-sql(at)postgresql(dot)org |
Subject: | Quotes and spaces |
Date: | 2001-10-05 22:28:26 |
Message-ID: | 3BBE340A.B8788CAE@waterford.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-sql |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2001-10-05 22:51:07 | Re: Quotes and spaces |
Previous Message | Martín Marqués | 2001-10-05 20:59:51 | Rules and missing inserts |
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2001-10-05 22:51:07 | Re: Quotes and spaces |
Previous Message | Peter Eisentraut | 2001-10-05 21:12:19 | Re: SQL CONSTRAINTS - Constraining time values from two |