pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <robertmhaas@gmail.com>
To: Matthew Wakeling <matthew@flymine.org>
Cc: pgsql-performance@postgresql.org
Subject: Re: plpgsql arrays
Date: Fri, 3 Apr 2009 09:47:31 -0400
Message-ID: <603c8f070904030647u1c92e13ew53612ac0011ed7c1@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.0904031420470.21772@aragorn.flymine.org>
References: <alpine.DEB.2.00.0904031420470.21772@aragorn.flymine.org>

On Fri, Apr 3, 2009 at 9:32 AM, Matthew Wakeling <matthew@flymine.org> wrote:
> I'm writing a plpgsql function that effectively does a merge join on the
> results of two queries. Now, it appears that I cannot read the results of
> two queries as streams in plpgsql, so I need to copy the contents of one
> query into an array first, and then iterate over the second query
> afterwards.

Why not just use SQL to do the join?

...Robert



view thread (32+ messages)  latest in thread

Message-ID: <603c8f070904030647u1c92e13ew53612ac0011ed7c1@mail.gmail.com>
Permalink:  ../603c8f070904030647u1c92e13ew53612ac0011ed7c1@mail.gmail.com/
Also on:    postgresql.org/message-id/603c8f070904030647u1c92e13ew53612ac0011ed7c1@mail.gmail.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: robertmhaas@gmail.com, matthew@flymine.org
  Subject: Re: plpgsql arrays
  In-Reply-To: <603c8f070904030647u1c92e13ew53612ac0011ed7c1@mail.gmail.com>
  References: <alpine.DEB.2.00.0904031420470.21772@aragorn.flymine.org> <603c8f070904030647u1c92e13ew53612ac0011ed7c1@mail.gmail.com>

* 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