Today, in a message to postgres-interfaces, Steve Wampler wrote:
>
> My (limited) understanding is that the view would have to be rebuilt
> after every insertion to keep it consistent,
In postgresql a view is in fact a relation just like a table is a
relation, except that the view has an "on select do instead .." trigger
attached to it (don't take the syntax literally, I'm writing this from
memory).
> whereas the temp table would stay empty - it's really just used as a
> place to attach the trigger to an insert without having to worry about
> recursion...
Same effect as using a view, except with a view you would also have a
trigger associated with select so you can select and insert into the same
relation.
Joachim
--
work: joachima@realtimeint.com (http://www.realtimeint.com)
private: joachim@kraut.bc.ca (http://www.kraut.bc.ca)