Re: finding medians - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: finding medians
Date
Msg-id 1022789803.2024.5.camel@rh72.home.ee
Whole thread Raw
In response to finding medians  (Josh Burdick <jburdick@gradient.cis.upenn.edu>)
List 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




pgsql-hackers by date:

Previous
From: "Christopher Kings-Lynne"
Date:
Subject: Re: Small changes to facilitate Win32 port
Next
From: Tom Lane
Date:
Subject: Re: Small changes to facilitate Win32 port