title: pl/pgsql array as input to an aggregate function
body: <p>i am writing pl/pgsql function that does some statistics processing. using 8.2 of postgres. i want to use this handy aggregate function:</p>
  
  <p>regr_slope(Y, X)</p>
  
  <p>but, i have my X and Y data stored as local arrays in the pl/pgsql function:
    y double precision[];
    x double precision[];</p>
  
  <p>trouble is when i use this as a line in the pl/pgsql function:</p>
  
  <p>slope := regr_slope(y, x);</p>
  
  <p>i get an error saying that function isn't available or has the wrong arguments. i suspect it's because the inputs are supposed to be selected as columns from a table instead of being passed as double precision arrays.</p>
  
  <p>is there a way to make the regr_slope function with local arrays? (ie, some way to cast the array to be a valid input to an aggregate function?)</p>
  
  <p>thank you.</p>