Re: feature proposal ...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Rod Taylor <pg(at)rbt(dot)ca>, tshipley(at)deru(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: feature proposal ...
Date: 2005-09-22 14:40:20
Message-ID: 28654.1127400020@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Stark <gsstark(at)mit(dot)edu> writes:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jonah H. Harris 2005-09-22 15:19:13 Hierarchical Queries--Stalled No Longer...
Previous Message Alvaro Herrera 2005-09-22 14:36:41 Re: Why does VACUUM FULL bother locking pages?