Mario Splivalo <[EMAIL PROTECTED]> writes: > Am I doing something wrong here, or there is no way of using temporary > tables within 'sql' written functions?
I believe the problem is that for a SQL function we parse the whole function body before executing any of it. So you'd need to split this into two separate functions. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq