Re: Inserting string with a " into an array using {} syntax ... possible?
| От | Bill Moran |
|---|---|
| Тема | Re: Inserting string with a " into an array using {} syntax ... possible? |
| Дата | |
| Msg-id | 20090313152000.2d93c475.wmoran@potentialtech.com обсуждение исходный текст |
| Ответ на | Re: Inserting string with a " into an array using {} syntax ... possible? (Alvaro Herrera <alvherre@commandprompt.com>) |
| Ответы |
Re: Inserting string with a " into an array using {} syntax ... possible?
|
| Список | pgsql-general |
In response to Alvaro Herrera <alvherre@commandprompt.com>:
> Bill Moran wrote:
>
> > bill=# insert into testarray (a) values (E'{"text \\"for you\\"","moretext"}');
> > INSERT 0 1
> > bill=# select * from testarray;
> > a | id
> > -------------------------------+----
> > {"text \"for you\"",moretext} | 3
>
> Actually this one is good. It gets the backslashes in the output because the "
> need to be escaped there too ('cause it's an array). But if you output a
> single element, they are not there:
Bizarre, but it passes my other tests as well, so I'll have to accept
it as correct ... just seems wrong somehow.
Thanks!
--
Bill Moran
http://www.potentialtech.com
http://people.collaborativefusion.com/~wmoran/
В списке pgsql-general по дате отправления: