Re: plpgsql arrays

From: Matthew Wakeling <matthew(at)flymine(dot)org>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: plpgsql arrays
Date: 2009-04-03 15:15:32
Message-ID: alpine.DEB.2.00.0904031614490.21772@aragorn.flymine.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Fri, 3 Apr 2009, Merlin Moncure wrote:
> select array(SELECT location FROM location, gene WHERE
> location.subjectid = gene.id ORDER BY objectid, intermine_start,
> intermine_end)) into genes;

Yeah, that works nicely.

> this will make array of location records. when you access the records
> to do the merge, make sure to use () noation:
>
> if (genes[x]).field > something then

How is that different to genes[x].field?

Matthew

--
And the lexer will say "Oh look, there's a null string. Oooh, there's
another. And another.", and will fall over spectacularly when it realises
there are actually rather a lot.
- Computer Science Lecturer (edited)

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Merlin Moncure 2009-04-03 15:18:33 Re: plpgsql arrays
Previous Message Merlin Moncure 2009-04-03 15:09:44 Re: plpgsql arrays