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 or flat)
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

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-2014 The PostgreSQL Global Development Group