Andrew Dunstan <andrew@dunslane.net> writes:
> Rod Taylor wrote:
>> Writing a file on the server requires significant privilege, including
>> access to the server itself so you can retrieve the results.
> But we also do COPY to STDOUT which requires no special privileges on
> the server.
Currently, we have a special privilege type about creating temporary
tables, which I think also restricts creating temporary views --- but
now that I think about it, it's not obvious why that should follow.
The only good argument I can see for restricting temp table creation
is that one might eat up large amounts of server disk space with a temp
table, and of course this argument doesn't apply to a temp view. So we
could refute this argument by just not making the permission check for
CREATE TEMP VIEW.
> Incidentally, if we are going to allow copy out from views, it would be
> nice and orthogonal to allow copy in too. Hasn't there been some talk
> about making automatically writeable views?
Sure, but until we actually have automatically writable views, it's a
bit premature to worry about that.
regards, tom lane