Thread: Export convert_to_scalar

Export convert_to_scalar

From
Gregory Stark
Date:
One of the ideas for pgadmin for the future will be a statistics table
visualizer which amongst other things could chart the histograms so people can
see if they represent the distribution of data they expect.

To do this pgadmin would need access to convert_to_scalar so it understands
where to plot values from the histogram (and because where to place them is
the only way to tell how tall to make the bars).

As the comments indicate convert_to_scalar is a bit of a hack and we may want
to reimplement it some day but there's no particular need to do so for this
task.

There are two options here, we can either provide a user-accessible catalog
function to access convert_to_scalar in pg_proc, or we can just export
convert_to_scalar and allow pgadmin's adminpack to define the corresponding
function.

I've actually already done both so I could play with it, I can post whichever
people prefer or both to patches. It would be good to get one or the other
done in 8.3 so that if I or anyone else implements the charting with for
pgadmin they can support 8.3 instead of having to wait until 8.4.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com



Re: Export convert_to_scalar

From
Magnus Hagander
Date:
On Mon, Jul 30, 2007 at 01:04:35PM +0100, Gregory Stark wrote:
> 
> One of the ideas for pgadmin for the future will be a statistics table
> visualizer which amongst other things could chart the histograms so people can
> see if they represent the distribution of data they expect.
> 
> To do this pgadmin would need access to convert_to_scalar so it understands
> where to plot values from the histogram (and because where to place them is
> the only way to tell how tall to make the bars).
> 
> As the comments indicate convert_to_scalar is a bit of a hack and we may want
> to reimplement it some day but there's no particular need to do so for this
> task.
> 
> There are two options here, we can either provide a user-accessible catalog
> function to access convert_to_scalar in pg_proc, or we can just export
> convert_to_scalar and allow pgadmin's adminpack to define the corresponding
> function.
> 
> I've actually already done both so I could play with it, I can post whichever
> people prefer or both to patches. It would be good to get one or the other
> done in 8.3 so that if I or anyone else implements the charting with for
> pgadmin they can support 8.3 instead of having to wait until 8.4.

Unless there are very good arguments for not doing it, I'd very much like
to see it in core rather than adminpack.

Most people don't install adminpack, really. And it doesn't play too well
in a hosted scenario. So I'd rather see more functionality moved from
adminpack into core than the other way around..

//Magnus