Re: problems with single quotes..

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: problems with single quotes..
Дата
Msg-id 3C0A4019.6040004@home.com
обсуждение исходный текст
Ответ на Re: Unexpected Return from Function  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-sql
Megalex wrote:

> ok.. here is my deal..
> 
> everytime i try to run an insert and my text contains '\'
> it fails..
> 
> an sql example would be.
> 
> Insert Into table(userID,FirstName,LastName) values(1,'''\''','test')
> and i get this message...
> 
> Error while executing the query; ERROR: parser: parse error at or near
> "test"
> 
> how can i fix this??

It isn't clear to me what literal you're trying to insert, but it looks 
like it's either:

vsreg_192=# select '\'\'\\\'\''; ?column?
---------- ''\''
(1 row)

or

vsreg_192=# select '\'\\\''; ?column?
---------- '\'
(1 row)

HTH,

Joe



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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: problems with single quotes..
Следующее
От: Tom Lane
Дата:
Сообщение: Re: problems with single quotes..