Re: obtaining ARRAY position for a given match
От | Merlin Moncure |
---|---|
Тема | Re: obtaining ARRAY position for a given match |
Дата | |
Msg-id | b42b73150911190943w4ffc2b2bk38fef13239b61d9e@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: obtaining ARRAY position for a given match (Scott Bailey <artacus@comcast.net>) |
Ответы |
Re: obtaining ARRAY position for a given match
Re: obtaining ARRAY position for a given match |
Список | pgsql-general |
On Thu, Nov 19, 2009 at 12:15 PM, Scott Bailey <artacus@comcast.net> wrote: >> FROM generate_series(array_lover($1,1),array_upper($1,1)) g(i) > > Pavel, > > Don't get me wrong, I enjoy coding, but I think you've taken it too far here > ;) > > Yes, definitely more effective for large arrays. Thanks. Would probably be a > good snippet for the wiki. this was actually a pretty typical solution to dealing with arrays until we got 'unnest()'. See information_schema._pg_expand_array for example. I need this functionality quite often...maybe we could use a version of unnest that works like that (returns idx, elem)? It would be a small efficiency win over generate_series based approaches. merlin
В списке pgsql-general по дате отправления: