Re: [SQL] Learning about WITH RECURSIVE

2009-11-04 Thread Tom Lane
Richard Broersma writes: > Actually I'm still confused. I must me missing something. When I > manually following the directions of: > http://www.postgresql.org/docs/8.4/interactive/queries-with.html > I get the following when I try: > WITH RECURSIVE t(n) AS ( > VALUES (1) > UNION ALL >

Re: [SQL] Learning about WITH RECURSIVE

2009-11-04 Thread Richard Broersma
On Wed, Nov 4, 2009 at 2:11 PM, Tom Lane wrote: > Richard Broersma writes: >> Can anyone one explain why a "WITH RECURSIVE" query has the same >> results regardless whether UNION or UNION ALL is specified? > > Well, if the rows are all different anyway, UNION isn't going to > eliminate any ...

Re: [SQL] Learning about WITH RECURSIVE

2009-11-04 Thread Richard Broersma
On Wed, Nov 4, 2009 at 2:11 PM, Tom Lane wrote: > Richard Broersma writes: >> Can anyone one explain why a "WITH RECURSIVE" query has the same >> results regardless whether UNION or UNION ALL is specified? > > Well, if the rows are all different anyway, UNION isn't going to > eliminate any ... O

Re: [SQL] Learning about WITH RECURSIVE

2009-11-04 Thread Tom Lane
Richard Broersma writes: > Can anyone one explain why a "WITH RECURSIVE" query has the same > results regardless whether UNION or UNION ALL is specified? Well, if the rows are all different anyway, UNION isn't going to eliminate any ... regards, tom lane -- Sent via pgs