Re: [SQL] ORDER BY in SQL functions

2001-02-13 Thread K. Ari Krupnikov
Tom Lane wrote: > > "K. Ari Krupnikov" <[EMAIL PROTECTED]> writes: > > CREATE FUNCTION foo (INT) > > RETURNS SETOF INT AS ' > > SELECT id > > FROM table > > WHERE some_colunm > $1 > > ORDER BY some_other_colun

[SQL] ORDER BY in SQL functions

2001-02-12 Thread K. Ari Krupnikov
rting must occur in the function, because once I have a set of IDs, there is no way to order them by some_other_column. The function cannot be rewritten in pl/pgsql because it may return more than one value. -- K. Ari Krupnikov DBDOM - bridging XML and relational databases http://www.iter.co.il