On Tue, Oct 16, 2012 at 09:44:03AM +0200, Maximilian Tyrtania wrote: > Is there a way that I can make my function return the field aliases? CREATE OR REPLACE FUNCTION f_aliastest() RETURNS setof text AS function defined as above returns set of values without any name. name is chosen by pg. you can't rename the columns in the "return query" part, but you can by changing definition of function to: create or replace function f_aliastest(OUT alias TEXT) returns setof record AS ... Best regards, depesz -- The best thing about modern society is how easy it is to avoid contact with it. http://depesz.com/ -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general