string variable with spaces in psql

Поиск
Список
Период
Сортировка
От AndreT
Тема string variable with spaces in psql
Дата
Msg-id b6effv$eir$1@news.hub.org
обсуждение исходный текст
Список pgsql-sql
Hi,

I need to define a variable in psql, but the variable needs to contain a
space:

This is what I want to do;

\set theName '\''John Nobody '\''
SELECT add_agent( :theName, 'Test Company', 'Test Department' );

...
etc

Unfortunately psql removes the space, so that theName = 'JohnNobody'

What do i need to do to preserve the space?

Thanks
-- 
Andre Truter

<------------------------------------------------->
< The box said: Requires Windows 95 or better...  >
< So I installed Linux                            >
<------------------------------------------------->



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: simple trigger question ...
Следующее
От: Walter McGinnis
Дата:
Сообщение: pesky plpgsql