On Thu, Dec 16, 2010 at 5:35 AM, Itagaki Takahiro
<itagaki.takahiro@gmail.com> wrote:
> Ah, I found my bug in BeginCopy(), but it's in the usage of
> ExecCheckRTPerms() rather than RowExclusiveLock, right?
> The target relation should have been opened and locked by the caller.
> I think we can move the check to DoCopy() as like as checking for
> superuser(). In my understanding, we don't have to check permissions
> in each FDW because it was done in parse and analyze phases.
> Could you fix it? Or, shall I do?
I believe that our project policy is that permissions checks must be
done at execution time, not parse/plan time.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company