Re: string variable with spaces in psql

Поиск
Список
Период
Сортировка
От Christoph Haller
Тема Re: string variable with spaces in psql
Дата
Msg-id 3E8D4E8B.1000402@rodos.fzk.de
обсуждение исходный текст
Ответ на string variable with spaces in psql  ("AndreT" <andret.NOSPAM@atio.co.za>)
Список pgsql-sql
>> I need to define a variable in psql, but the variable needs to contain a> space:>> This is what I want to do;>>
\settheName '\''John Nobody '\''> SELECT add_agent( :theName, 'Test Company', 'Test Department' );>> ...> etc>>
Unfortunatelypsql removes the space, so that theName = 'JohnNobody'>> What do i need to do to preserve the space?>
 
Did you try
\set theName "John Nobody "

Regards, Christoph



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

Предыдущее
От: Manfred Koizar
Дата:
Сообщение: Re: More wacky grouping
Следующее
От: Christoph Haller
Дата:
Сообщение: Re: Finding if a temp table exists in the current connection