pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: Matthew Schumacher <matt.s@aptalaska.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: How to loop though an array plpgsql?
Date: Sat, 30 Jul 2005 07:15:05 -0600
Message-ID: <20050730131505.GA65221@winnie.fuhr.org> (raw)
In-Reply-To: <42EABE20.6040805@aptalaska.net>
References: <42EABE20.6040805@aptalaska.net>

On Fri, Jul 29, 2005 at 03:39:12PM -0800, Matthew Schumacher wrote:
> I need to loop though an input array, but can't figure out how to do it,
> the docs aren't really clear on this.

This comes up from time to time -- search the archives to see past
discussion.  Suggestions usually involve array_lower() and array_upper().

http://archives.postgresql.org/
http://www.postgresql.org/docs/8.0/static/functions-array.html

If you're using integers then see also the int_array_enum() function
in the contrib/intagg module.

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/



view thread (2+ messages)

Message-ID: <20050730131505.GA65221@winnie.fuhr.org>
Permalink:  ../20050730131505.GA65221@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20050730131505.GA65221@winnie.fuhr.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mike@fuhr.org, matt.s@aptalaska.net
  Subject: Re: How to loop though an array plpgsql?
  In-Reply-To: <20050730131505.GA65221@winnie.fuhr.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox