> What about > $$ > INSERT INTO .... ; > select currval('seq_matchmaking_session_id'); > $$ language sql; > > ?
Indeed... :-( For some reason, I thought that it was not possible to have to SQL statement in an SQL stored function. By the way, is there any performance difference between pure SQL and PL/pgSQL stored functions? If I remember correctly there was such a distinction between pure SQL statement and PL/PLSQL stored procedures (Oracle), in the sense that PL/PLSQL stored procedures are executed within the PL/PLSQL engine which sends pure SQL statements to the SQL engine for execution. There is a little overhead between PL/PLSQL and SQL engines. Regards, -- Daniel ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings