> > CREATE FUNCTION foo(...) RETURNS INT4 AS '
> > SELECT shoesize FROM customers ORDER BY time LIMIT 1
> > ' LANGUAGE 'sql';
> > It gives an error that returning multiple values is not allowed.
>
> In what version of Postgres, pray tell? I can't duplicate that behavior
> in 7.0.3 nor current.
It's 7.0.3. Mail me an example of something which works and I'll try
it out.
> Consider DISTINCT ON. Here's the example given in the SELECT reference
> manual page:
Is that the optimal way to do this? What the man page described is
exactly what I'm trying to do.
Thanks