Re: finding medians

Started by Hannu Krosingalmost 24 years ago1 messageshackers
Jump to latest
#1Hannu Krosing
hannu@tm.ee

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