Greg Stark <[EMAIL PROTECTED]> writes: > Tom Lane <[EMAIL PROTECTED]> writes: >> So we could refute this argument by just not making the permission check for >> CREATE TEMP VIEW.
> This is the first time I've ever heard of CREATE TEMP VIEW. What's the point > of it since you can always directly do: > SELECT * FROM (...) > ? Separation of concerns, for one thing: the code using the view need not know the exact contents of the select, or perhaps not even have permissions to access the underlying tables. (Think of a temp view created by a SECURITY DEFINER function for instance.) In this particular case it gives us separation of concerns in a different way, ie, we don't have to figure out a way to force-fit the complete syntax of SELECT inside a COPY command. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match