Hello 2012/10/4 clear chan <clear.cas.1140@xxxxxxxxx>: > Hi, i am new to postresql and have been trying to convert some of our mssql > procedures into postresql functions. What i have been trying to do is to > somehow return a temporary table with dynamic columns. Is it possible? > it is possible, but usually it is not, what you want CREATE OR REPLACE FUNCTION foo() RETURNS SETOF RECORD AS $$ SELECT * FROM temptab; $$ LANGUAGE sql; but you have to specify columns in query SELECT * FROM foo() (a int, b int, c int); A style of PostgreSQL stored procedures is significantly different than MSSQL - it is more close to Oracle. Regards Pavel Stehule > -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general