pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Matthew Wakeling <matthew@flymine.org>
Cc: pgsql-performance@postgresql.org
Subject: Re: plpgsql arrays
Date: Fri, 03 Apr 2009 10:48:31 -0400
Message-ID: <1138.1238770111@sss.pgh.pa.us> (raw)
In-Reply-To: <alpine.DEB.2.00.0904031526080.21772@aragorn.flymine.org>
References: <alpine.DEB.2.00.0904031420470.21772@aragorn.flymine.org>
	<603c8f070904030647u1c92e13ew53612ac0011ed7c1@mail.gmail.com>
	<alpine.DEB.2.00.0904031455210.21772@aragorn.flymine.org>
	<28595.1238767442@sss.pgh.pa.us>
	<alpine.DEB.2.00.0904031507000.21772@aragorn.flymine.org>
	<29730.1238768681@sss.pgh.pa.us>
	<alpine.DEB.2.00.0904031526080.21772@aragorn.flymine.org>

Matthew Wakeling <matthew@flymine.org> writes:
> On Fri, 3 Apr 2009, Tom Lane wrote:
>> Not unless you have sorted the inputs in some way that has more 
>> knowledge than the "equal" operator represents.  Otherwise you can have 
>> elements drop out that might still be needed to match to a later 
>> left-hand element.

> Of course. You certainly have to choose a sort order that works. Sorting 
> by the start field would be sufficient in this case.

Uh, no, it wouldn't.  Visually:

	L1	-------------------------
	L2	-----------
	L3	---------------------

	R1	               --------

At L2, you'd conclude that you're done matching R1.

Intuitively, it seems like 1-D "overlaps" is a tractable enough
operator that you should be able to make something merge-like
work.  But it's more complicated than I think you realize.

			regards, tom lane



view thread (32+ messages)  latest in thread

Message-ID: <1138.1238770111@sss.pgh.pa.us>
Permalink:  ../1138.1238770111@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1138.1238770111@sss.pgh.pa.us

 · 

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-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, matthew@flymine.org
  Subject: Re: plpgsql arrays
  In-Reply-To: <1138.1238770111@sss.pgh.pa.us>

* 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