Re: Subselects - recursion problem
| От | Martijn van Oosterhout |
|---|---|
| Тема | Re: Subselects - recursion problem |
| Дата | |
| Msg-id | 20050530095023.GB28961@svana.org обсуждение исходный текст |
| Ответ на | Subselects - recursion problem (Philip Rhoades <phil@chu.com.au>) |
| Ответы |
Re: Subselects - recursion problem
|
| Список | pgsql-general |
On Mon, May 30, 2005 at 07:33:04PM +1000, Philip Rhoades wrote: > People, > > The following script works (I have confirmed it by doing two separate > views and doing a select on them) - but I don't understand why there > isn't a recursion problem with c1.policy and c2.policy - is there some > sort of trick happening? "recursion problem" ? It's called a correlated subquery. SQL is declarative, you state what you want and the database figures out how to get the answer for you. I think you need to go and read up on the basics of SQL. If you want to see *how* the database is working out the answer, use explain and it'll display the query plan. Hope this helps, -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a > tool for doing 5% of the work and then sitting around waiting for someone > else to do the other 95% so you can sue them.
Вложения
В списке pgsql-general по дате отправления: