Re: proposal: searching in array function - array_position
От | Alvaro Herrera |
---|---|
Тема | Re: proposal: searching in array function - array_position |
Дата | |
Msg-id | 20150320172942.GX3636@alvh.no-ip.org обсуждение исходный текст |
Ответ на | Re: proposal: searching in array function - array_position (Pavel Stehule <pavel.stehule@gmail.com>) |
Ответы |
Re: proposal: searching in array function - array_position
Re: proposal: searching in array function - array_position Re: proposal: searching in array function - array_position |
Список | pgsql-hackers |
Pavel Stehule wrote: > 2015-03-20 17:49 GMT+01:00 Dean Rasheed <dean.a.rasheed@gmail.com>: > > > There's an issue when the array's lower bound isn't 1: > > > > select array_offset('[2:4]={1,2,3}'::int[], 1); > > array_offset > > -------------- > > 1 > > (1 row) > > > > whereas I would expect this to return 2. Similarly for > > array_offsets(), so the offsets can be used as indexes into the > > original array. > > > > I am thinking, so it is ok - it returns a offset, not position. So you can't use it as a subscript? That sounds unfriendly. Almost every function using this will be subtly broken. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления: