
Dear hackers,

I'm looking for an array_index function that would return the index of the
occurence of some element in an array. I noticed that I can know whether a
element is in the array with ANY, but I also need the actual index.

There is no such function under that name, and I cannot find any that
would do the job in the doc. I made a quick workaround in plpgsql, but I
would have expected the function to be there.

Am I unlucky or just blind?

I know that looking for such a function is a proof a bad design, but I
don't feel responsible for the pg_catalog.* design;-)

Thanks in advance for any pointer,

Have a nice day,

-- 
Fabien Coelho - coelho@cri.ensmp.fr

Fri, 19 Mar 2004 16:19:11 +0100 (CET)
Fabien COELHO <coelho@cri.ensmp.fr>
looking for an 'array_index' function?
Fabien COELHO wrote:
> Am I unlucky or just blind?

Unlucky I guess. No such function, least not yet.

Joe


Fri, 19 Mar 2004 21:41:49 -0800
Joe Conway <mail@joeconway.com>
Re: looking for an 'array_index' function?