working with arrays inside a plpgsql function

From: "Luis Silva" <lfs12(at)hotmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: working with arrays inside a plpgsql function
Date: 2007-02-15 14:08:15
Message-ID: BAY117-F147241771170F333D76789B5960@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi all!

I'm trying to use array inside a pl/pgsql function and I'm having some
problems using the all array at the same time. Let me give you an example:

ident text[];

BEGIN

ident = $1; -- $1 is a array argument from the plpgsql function
EXECUTE 'SELECT count(identity) FROM public_data WHERE identity IN ||ident
INTO asds;

This last query returns an error. Any guess to solve this problem? tks a lot
PS - How can I retrieved the size ofthe array? I saw the manual and I
couldn't find it.

Regards,

Lus

_________________________________________________________________
Check out all that glitters with the MSN Entertainment Guide to the Academy
Awards http://movies.msn.com/movies/oscars2007/?icid=ncoscartagline2

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Andreas Kretschmer 2007-02-15 16:06:56 Re: working with arrays inside a plpgsql function
Previous Message Tim Bowden 2007-02-15 06:26:06 Re: install on ubuntu