Quotes and spaces

Поиск
Список
Период
Сортировка
От Oleg Lebedev
Тема Quotes and spaces
Дата
Msg-id 3BBE340A.B8788CAE@waterford.org
обсуждение исходный текст
Ответ на Re: Why the weak key is created as unique  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Ответы Re: Quotes and spaces  ("Josh Berkus" <josh@agliodbs.com>)
Re: Quotes and spaces  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список 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




В списке pgsql-sql по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: SQL CONSTRAINTS - Constraining time values from two
Следующее
От: "Josh Berkus"
Дата:
Сообщение: Re: Quotes and spaces