Re: [SQL] A tricky sql-query...

2003-11-02 Thread Mark Stosberg
On 2003-10-22, Timo <[EMAIL PROTECTED]> wrote:
>
> You can't have any recursion in an pure sql-query, can you?

It depends on how you think of recursion, I'd say. You join on the same
table a number of times, by giving it a different alias each time. You 
have to manually specify (or generate with application code) all these 
aliases and joins, though. Sometimes people use this technique to
implement tree structures in SQL.  

Mark

-- 
http://mark.stosberg.com/ 


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [SQL] A tricky sql-query...

2003-11-02 Thread Rod Taylor
On Sun, 2003-11-02 at 19:42, Mark Stosberg wrote:
> On 2003-10-22, Timo <[EMAIL PROTECTED]> wrote:
> >
> > You can't have any recursion in an pure sql-query, can you?
> 
> It depends on how you think of recursion, I'd say. You join on the same
> table a number of times, by giving it a different alias each time. You 
> have to manually specify (or generate with application code) all these 
> aliases and joins, though. Sometimes people use this technique to
> implement tree structures in SQL.  

Not to mention the WITH .. RECURSIVE clause, not yet in PostgreSQL.



signature.asc
Description: This is a digitally signed message part


Re: [SQL] A tricky sql-query...

2003-11-02 Thread Christopher Browne
Quoth [EMAIL PROTECTED] (Mark Stosberg):
> On 2003-10-22, Timo <[EMAIL PROTECTED]> wrote:
>>
>> You can't have any recursion in an pure sql-query, can you?
>
> It depends on how you think of recursion, I'd say. You join on the same
> table a number of times, by giving it a different alias each time. You 
> have to manually specify (or generate with application code) all these 
> aliases and joins, though. Sometimes people use this technique to
> implement tree structures in SQL.  

There is apparently an SQL 1999 feature that expressly supports
recursion.

WITH RECURSIVE 
Q1 AS SELECT ... FROM ... WHERE ...
Q2 AS SELECT ... FROM ... WHERE ...
  SELECT ... FROM Q1, Q2 WHERE ...

See example here...



There is presumably some work ongoing; support for WITH RECURSIVE is
on the TODO list, and has been discussed before...

http://archives.postgresql.org/pgsql-hackers/2003-05/msg00657.php
-- 
output = reverse("gro.mca" "@" "enworbbc")
http://www.ntlug.org/~cbbrowne/linuxdistributions.html
"Listen,  strange women, lyin'  in ponds,  distributin' swords,  is no
basis  for a  system of  government. Supreme  executive  power derives
itself from a mandate from  the masses, not from some farcical aquatic
ceremony."  -- Monty Python and the Holy Grail

---(end of broadcast)---
TIP 8: explain analyze is your friend


[SQL] pgAdmin

2003-11-02 Thread Ganesan Kanavathy








How do I uninstall pgAdmin III?
Please help

 

Regards,

Ganesan

 








Re: [SQL] [ADMIN] pgAdmin

2003-11-02 Thread Ganesan Kanavathy








pgAdmin is installed
on linux redhat 8.

 



Regards,

Ganesan



 

-Original Message-
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ganesan Kanavathy
Sent: Sunday, November 02, 2003 17:03
To: [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: [ADMIN] pgAdmin

 

How do I uninstall pgAdmin III?
Please help

 

Regards,

Ganesan