The function is created as postgres user. And I get a permission denied error. -- View this message in context: http://postgresql.nabble.com/Unable-to-select-a-table-as-postgres-user-tp5872036p5872055.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general