Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Too many function calls in view with LEFT JOIN



Andreas Heiduk <Andreas(dot)Heiduk(at)web(dot)de> writes:
> If a view which calls a function is LEFT JOINed to a table but not all
> result rows are matched by some criteria, then the function is called 
> for each row of the view nevertheless.

> Note that this seems to happen only for left joins, not for a inner join.

I believe that's because the column is required to go to NULL in an
unjoined row.  With a non-strict function, evaluating it after the join
could yield wrong answers.  Try making the function strict.

			regards, tom lane



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group