[GENERAL] Selecting from a function(x,y) returning a row-type(sum, prod)

2007-04-30 Thread Heiko Klein
Hi, I'm trying to select data from a table, converting two values and return all four. Maybe this is best explained with an example: The function from the documentation on pl/pgsql: CREATE FUNCTION sum_n_product(x int, y int, OUT sum int, OUT prod int) AS $$ BEGIN sum := x + y; prod :

Re: [GENERAL] Selecting from a function(x,y) returning a row-type(sum, prod)

2007-05-02 Thread Heiko Klein
Thanks, my real function is quite expensive, so I don't want it to execute twice. Toms subselect query is therefore exactly what I want, and since it will be hidden in a view, it doesn't matter that it is a long expression. Best regards, Heiko Tom Lane wrote: regression=# select x,y,(f).*