Re: ARRAY[] with \'s is broken?

Поиск
Список
Период
Сортировка
От Rod Taylor
Тема Re: ARRAY[] with \'s is broken?
Дата
Msg-id 1116350399.696.189.camel@home
обсуждение исходный текст
Ответ на ARRAY[] with \'s is broken?  (Rod Taylor <pg@rbt.ca>)
Ответы Re: ARRAY[] with \'s is broken?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: ARRAY[] with \'s is broken?  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
On Tue, 2005-05-17 at 13:18 -0400, Andrew Dunstan wrote:
> I don't see anything broken. V 7.4.8 shows the same:

How the heck do you store a single backslash in an text array?

> andrew=# select ARRAY['\\a'] as f1, ARRAY['\a']as f2 , ARRAY['\\\a'] as f2; 
> 
>    f1    | f2  |   f2    
> 
>  --------+-----+---------
> 
>  {"\\a"} | {a} | {"\\a"}
> 
> It might be mildly confusing because '\a' == 'a'

> cheers
> 
> andrew
> 
> 
> 
> Rod Taylor wrote:
> 
> >Can anyone explain what's going on with the slashes?
> >
> >ssdb=# select version();
> >                                  version
> >---------------------------------------------------------------------------
> > PostgreSQL 8.0.1 on sparc-sun-solaris2.9, compiled by GCC gcc (GCC)
> >3.4.2
> >(1 row)
> >
> >ssdb=# select ARRAY['\\a'];
> >  array
> >---------
> > {"\\a"}
> >(1 row)
> >
> >ssdb=# select ARRAY['\a'];
> > array
> >-------
> > {a}
> >(1 row)
> >
> >ssdb=# select ARRAY['\\\a'];
> >  array
> >---------
> > {"\\a"}
> >(1 row)
> >
> >
> >
> >
> >  
> >
> 
-- 



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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: Learning curves and such (was Re: pgFoundry)
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: ARRAY[] with \'s is broken?