Re: finding medians

From: Hannu Krosing <hannu(at)tm(dot)ee>
To: Josh Burdick <jburdick(at)gradient(dot)cis(dot)upenn(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org, josh(at)agliodbs(dot)com
Subject: Re: finding medians
Date: 2002-05-30 20:16:41
Message-ID: 1022789803.2024.5.camel@rh72.home.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 2002-05-31 at 01:16, Josh Burdick wrote:
> BUG: this isn't properly set up to deal with multiple users.
> For example, if A computes a median, then B could read the data
> from the median_tmp table. Possibly you could fiddle with
> transaction isolation levels, or add a user field to median_tmp,
> or something else complicated, to prevent this, but for now I'm
> not worrying about this.

You could just use temp tables and indexes - they are local to
connection .

create TEMP sequence median_id;
create TEMP table median_tmp (
median_id int,
x float4
);

---------------
Hannu

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Burdick 2002-05-30 20:16:43 finding medians
Previous Message Tom Lane 2002-05-30 17:33:24 Re: self-tuning histograms