Re: strange permission error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mr Dash Four <mr(dot)dash(dot)four(at)googlemail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: strange permission error
Date: 2012-09-30 14:51:33
Message-ID: 25155.1349016693@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Mr Dash Four <mr(dot)dash(dot)four(at)googlemail(dot)com> writes:
> In my database I have restricted access to a particular user
> (non-superuser), which is used when a cron job passes a series of sql
> script files for execution via psql. During one such statement (below) I
> get the following set of error:

> ERROR: permission denied for schema pg_catalog
> CONTEXT: SQL function "textanycat" during inlining
> STATEMENT: COPY ( SELECT v FROM dandy.audit_v ) TO STDOUT ;

> What is causing the above permission error? I have deliberately
> restricted user access to pg_catalog

You caused it yourself, then. Don't do that. (Or if you must,
it's your own responsibility to fix things when they break. But
preventing read access to pg_catalog seems pretty crippling.)

FWIW, it's probably the "'user: ' || u_name" expressions that result
in this specific failure.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2012-09-30 15:14:31 Re: transitive pruning optimization on the right side of a join for partition tables
Previous Message bryanck 2012-09-30 13:28:23 Re: Postgresql 9.2 OOM