David Legault wrote:
So it turns out that in a SECURITY DEFINER the current_user is the owner of the function. I had to use session_user and it works now :)See the EXECUTE function in the pl/pgSQL language in the docs for dynamic queries.
- George ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster