Quoted strings on CLI

Поиск
Список
Период
Сортировка
От Alexander Reichstadt
Тема Quoted strings on CLI
Дата
Msg-id E9D61B45-37C0-4833-96C0-3025BFC08245@mac.com
обсуждение исходный текст
Ответы Re: Quoted strings on CLI  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-general
Hi,

I just migrated from mysql and am running into an issue I found no solution for when researching. Using the web
interfaceI can insert values that contain single-quotes. But using the CLI I found no way to select or insert single
quotes:

PetWork=# select * from persons where firstname='\'Peter\'';
Invalid command \'';. Try \? for help.
PetWork-# select * from persons where firstname='\\'Peter\\'';
Invalid command \. Try \? for help.
PetWork-# select * from persons where firstname='\\\'Peter\\\'';
Invalid command \. Try \? for help.
PetWork-# select * from persons where firstname='\\\\'Peter\\\\'';
Invalid command \. Try \? for help.
PetWork-# select * from persons where firstname='\\\\'Peter\\\\'';

On different forums the solution suggested is to prepend backslashes. But it doesn't matter how many backslashes I
prepend,it always fails. What does one have to do to achieve that? 

Thanks for any help

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

Предыдущее
От: chinnaobi
Дата:
Сообщение: Re: archive_cleanup_command recovery.conf Standby server error
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Quoted strings on CLI