Re: [GENERAL] order by, within a plpgsql fx

2011-12-02 Thread Tom Lane
writes: > Please consider this plpgsql function: > = = = = = = = = = = > CREATE Or Replace FUNCTION fx_order_by ( ) > RETURNS table( last_name text, first_name ) > AS $eofx$ > DECLARE > -- > BEGIN > Return Query > select > lname, fname > from > my_table > order by > lname ASC

[GENERAL] order by, within a plpgsql fx

2011-12-02 Thread david.sahagian
Please consider this plpgsql function: = = = = = = = = = = CREATE Or Replace FUNCTION fx_order_by ( ) RETURNS table( last_name text, first_name ) AS $eofx$ DECLARE -- BEGIN Return Query select lname, fname from my_table order by lname ASC ; END; $eofx$ LANGUAGE plpgsql; = =