Skip site navigation (1) Skip section navigation (2)

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 (view raw, whole thread or download thread mbox)
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[];


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.



Check out all that glitters with the MSN Entertainment Guide to the Academy 


pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group