Thread: recursive SQL

recursive SQL

From
"jacob koehler (RRes-Roth)"
Date:
hi,

i am wondering what you think about including evgen potemkin's patch for recursive SQL in the next postgres version:
http://gppl.terminal.ru/

cons:
- its not standard SQL (uses oracle style syntax)

pros:
- it would add a feature that many people miss already for ages. all existing workarounds are a pain in the ass, and
aretoo slow for realistic applications. 
- full SQL99 compliant recursive queries are much more complex, i.e. i think it is even unlikely that they will find
theirway into 7.6.  
- Evgen DID publish this patch under GPL, see:
http://gppl.terminal.ru/README.html
- the code doesnt look too bad (although im not the right person to judge such things), and it seems the developer
takescare of bugfixes (and possibly also feature requests like sql99 compliance?), i.e. this might be a realistic
startingpointfor SQL99 compliant recursive queries. 

i am aware of the fact that tom lane pointed to the fact that Andrew Overholt did work towards SQL99 compliant
recursivequeries. it would be interesting to know andrews opinion how much more work would be needed to get a SQL99
compliantversion out based on the work he has done so far, and what he thinks about Evgen potemkin's patch (i cced this
mailto Andrew and Evgen). 

in summary, i think Evgens patch would cover 95% of all user needs, and releasing it with 7.5 would be a realistic step
towardsa feature that many users like me are missing for a long time already...  

regards,
jacob koehler


Re: recursive SQL

From
Andrew Dunstan
Date:

jacob koehler (RRes-Roth) wrote:

>hi,
>
>i am wondering what you think about including evgen potemkin's patch for recursive SQL in the next postgres version:
>http://gppl.terminal.ru/
>
>[snip]
>

>- Evgen DID publish this patch under GPL, see:
>http://gppl.terminal.ru/README.html
>
>  
>

It would first have to be relicensed ...

cheers

andrew


Re: recursive SQL

From
"jacob koehler (RRes-Roth)"
Date:

> -----Original Message-----
> From: Andrew Dunstan [mailto:andrew@dunslane.net]
> Sent: 26 June 2004 20:42
> To: pgsql-hackers@postgresql.org
> Subject: Re: [HACKERS] recursive SQL
>
>
>
>
> jacob koehler (RRes-Roth) wrote:
>
> >hi,
> >
> >i am wondering what you think about including evgen potemkin's patch
> >for recursive SQL in the next postgres version:
> >http://gppl.terminal.ru/
> >
> >[snip]
> >
>
> >- Evgen DID publish this patch under GPL, see:
> >http://gppl.terminal.ru/README.html
> >
> >
> >
>
> It would first have to be relicensed ...

it would be interesting to know if it would be included, IFF the author
publishes it under BSD.

(the authors webpage gives the impression that he is happy to share it.
the fact that the reference to GPL is well hidden in the authors
webpage, indicates that the author did not really think much about which
license he chooses, i.e. he might be happy to change to BSD.)

as i said, i think the lack of recursive queries (whatever syntax they
are in) are one of the major drawbacks of postgres when compared to
other databases.

cheers,
jacob


Re: recursive SQL

From
Christopher Kings-Lynne
Date:
> - Evgen DID publish this patch under GPL, see:
> http://gppl.terminal.ru/README.html

We cannot use GPL code in PostgreSQL.  PostgreSQL is BSD licensed.  As 
to why on earth he GPL'd - I have no idea...

Chris


Re: recursive SQL

From
Tom Lane
Date:
"jacob koehler (RRes-Roth)" <jacob.koehler@bbsrc.ac.uk> writes:
>> It would first have to be relicensed ...

> it would be interesting to know if it would be included, IFF the author
> publishes it under BSD.

This patch has been proposed and rejected before.  It doesn't do the
SQL-standard syntax for recursion, and I have little faith in the
implementation even if it did the right syntax.

There has been some work done towards implementing the spec-compatible
syntax, but it's not likely to get finished in time for 7.5 :-(
        regards, tom lane


Re: recursive SQL

From
"jacob koehler (RRes-Roth)"
Date:
seems evgen has got a sql99 compliant version of recursive SQL out and would agree to relicense it.
are there any other concerns regarding evgens work? or do you want to encourage him to go this route? i have the
impressionhe would happily join in on the postgres developement wrt recursive SQL, and some friendly words might
encouragehim to do the required work. 

cheers,
jacob

> -----Original Message-----
> From: Potemkin Evgen [mailto:gppl@inbox.ru]
> Sent: 28 June 2004 16:05
> To: jacob koehler (RRes-Roth)
> Subject: Re: FW: [HACKERS] recursive SQL
>
>
> Hello,
>
> yes, it would be great if patch will be included in postgres,
> and if it needed sure i will relicense it to BSD. problem is
> that core team don't want to include it at all. (see message
> from Tom Lane on this topic). some peoples already tried to
> get the patch in pg's distro, but without any result.
>
> the funny thing that i almost get working implementation
> of SQL99 recursive queries,"just for fun";), and i think
> it would not be included too;)
>
> regards,
> evgen
> -----Original Message-----
>
> >dear evgen potemkin,
> >
> >i hope you dont mind that i have taken this step. i saw that you
> >invested some serious work, and your webpage gave me the impression
> >that you are happy to share your patch.
> >
> >However, it seems that if you would want to make your code
> part of the
> >official postgres release, it also seems you would have to
> license your
> >patch under the same license as postgres itself, which is
> not GPL, but
> >BSD, see: http://www.postgresql.org/licence.html
> >
> >i think it would be very useful to have your patch as part of the
> >official release...
> >
> >regards,
> >jacob
> >
> >
> >> -----Original Message-----
> >> From: Andrew Dunstan [mailto:andrew@dunslane.net]
> >> Sent: 26 June 2004 20:42
> >> To: pgsql-hackers@postgresql.org
> >> Subject: Re: [HACKERS] recursive SQL
> >>
> >> jacob koehler (RRes-Roth) wrote:
> >>
> >> >hi,
> >> >
> >> >i am wondering what you think about including evgen
> potemkin's patch
> >> >for recursive SQL in the next postgres version:
> >> >http://gppl.terminal.ru/
> >> >
> >> >[snip]
> >> >
> >>
> >> >- Evgen DID publish this patch under GPL, see:
> >> >http://gppl.terminal.ru/README.html
> >> >
> >>
> >> It would first have to be relicensed ...
> >>
> >> cheers
> >>
> >> andrew
> >>
>
>


Re: recursive SQL

From
Christopher Kings-Lynne
Date:
Hi Evgen,

I'm a PostgreSQL developer and I would like to see an SQL99 recursive 
queries feature in PostgreSQL.

I'm pretty sure that Tom would be happy with an SQL99 compliant version 
of your patch, so long as it's up to scratch with the normal PostgreSQL 
coding and reliability standards.

I'm not a committer myself, so I think I should explain how things work.  We're unlike other projects that seem to
acceptalmost anything that 
 
comes our way.  In many ways, it's the patches that the committers 
reject that make PostgreSQL strong.

To get your patch accepted, you have to be prepared to work WITH the 
committers, especially Tom, and make changes based on their feedback.  I 
know this costs you in wounded pride (I get the same feeling sometimes), 
but in the end it's worth it.  Sometimes the committers are very busy 
and it takes ages before someone actually reviews your patch.  Don't 
take that as a snub, take it as an opportunity to keep working on it!

I think that you and the PostgreSQL project can meet somewhere in the 
middle on this and we can get your stuff in for the 7.6 release (it's 
too late for 7.5 right now).  Don't take this as a guarantee of course, 
but if you'll willing to work with us and stick with the patch, then I 
think it will get in.

Comments?

Regards,

Chris
-- 
PostgreSQL Developer

jacob koehler (RRes-Roth) wrote:
> seems evgen has got a sql99 compliant version of recursive SQL out and would agree to relicense it.
> are there any other concerns regarding evgens work? or do you want to encourage him to go this route? i have the
impressionhe would happily join in on the postgres developement wrt recursive SQL, and some friendly words might
encouragehim to do the required work.
 
> 
> cheers,
> jacob
> 
> 
>>-----Original Message-----
>>From: Potemkin Evgen [mailto:gppl@inbox.ru] 
>>Sent: 28 June 2004 16:05
>>To: jacob koehler (RRes-Roth)
>>Subject: Re: FW: [HACKERS] recursive SQL
>>
>>
>>Hello,
>>
>>yes, it would be great if patch will be included in postgres, 
>>and if it needed sure i will relicense it to BSD. problem is 
>>that core team don't want to include it at all. (see message 
>>from Tom Lane on this topic). some peoples already tried to 
>>get the patch in pg's distro, but without any result.
>>
>>the funny thing that i almost get working implementation
>>of SQL99 recursive queries,"just for fun";), and i think 
>>it would not be included too;)
>>
>>regards,
>>evgen


Re: recursive SQL

From
Hannu Krosing
Date:
On T, 2004-06-29 at 13:11, jacob koehler (RRes-Roth) wrote:
> seems evgen has got a sql99 compliant version of recursive SQL 
> out and would agree to relicense it.
> are there any other concerns regarding evgens work? or do you want to 
> encourage him to go this route? i have the impression he would happily 
> join in on the postgres developement wrt recursive SQL, and some friendly 
> words might encourage him to do the required work.

> > the funny thing that i almost get working implementation
> > of SQL99 recursive queries,"just for fun";), and i think 
> > it would not be included too;)

Maybe he knows of some fundamental flaws with his implementation ?

Why else does he think that it will not be accepted ?

He could at least try to submit it again, once it is past the "almost"
part :)

BTW, I also "almost" got a working implementation of SQL99 recursive
queries (at least it parsed the syntax ;), but gave up due to lack of
time and also because the SQL99 recursive queries are a desceptively
complex beast which I was unable to fully understand from the specs, at
least the part beyond the simple parent-child tree queries.

And the simple parent-child tree queriest are now doable using
set-returning functions.

----------------
Hannu



Re: recursive SQL

From
"jacob koehler (RRes-Roth)"
Date:

> -----Original Message-----
> From: Andrew Overholt [mailto:overholt@redhat.com]
> Sent: 28 June 2004 16:45
> To: jacob koehler (RRes-Roth)
> Cc: pgsql-hackers@postgresql.org; gppl@inbox.ru; Alexander Rüegg
> Subject: Re: recursive SQL
>
>
> * jacob koehler (RRes-Roth) <jacob.koehler@bbsrc.ac.uk>
> [2004-06-27 20:58]:
> >
> > cons:
> > - its not standard SQL (uses oracle style syntax)
>
> Besides the GPL issue, this is my biggest problem.
>
> > i am aware of the fact that tom lane pointed to the fact
> that Andrew
> > Overholt did work towards SQL99 compliant recursive
> queries. it would
> > be interesting to know andrews opinion how much more work would be
> > needed to get a SQL99 compliant version out based on the
> work he has
> > done so far, and what he thinks about Evgen potemkin's
> patch (i cced
> > this mail to Andrew and Evgen).
>
> My work towards SQL-standard recursive queries is nowhere
> near complete and I'm sure any patches I had are severely
> rotten by now.  I'll try to grab what I had and see if I can
> get a patch from which people can maybe pick up.

thank you for your reply. i know that sql99 recursive sql is "a beast". maybe it would be good if you have a look on
evgensrecent work, and try to decide if it is better to continue on his or on your work? or maybe some things from him
andfrom you can be thrown together? 

> Sorry for dropping the ball on this one.  I was back
> finishing up my degree this past year and my current work

which is a reason that i can understand very well...

> isn't database-related :( .  I'll see what I can do.  This
> would be a great feature for PostgreSQL.

i perfectly agree...

cheers
jacob

>
> Andrew
>


Re: recursive SQL

From
Michael Meskes
Date:
On Tue, Jun 29, 2004 at 07:23:45PM +0800, Christopher Kings-Lynne wrote:
> I'm a PostgreSQL developer and I would like to see an SQL99 recursive 
> queries feature in PostgreSQL.

Me too, on bot parts.

> I'm not a committer myself, so I think I should explain how things work. 
>  We're unlike other projects that seem to accept almost anything that 
> comes our way.  In many ways, it's the patches that the committers 
> reject that make PostgreSQL strong.

Actaully I am a committer and I would stil not touch that part of the
source as I never worked on it. I just commit patches that I can
personally judge to be good.

But nevertheless I would be very interested in helping with this patch
as recursive query optimization was one are I wokred on for my ph.d.

Granted spare time is a problem, but we should be able to finish this
for 7.6.

Michael
-- 
Michael Meskes
Email: Michael at Fam-Meskes dot De
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!


Re: recursive SQL

From
Andrew Overholt
Date:
* jacob koehler (RRes-Roth) <jacob.koehler@bbsrc.ac.uk> [2004-06-27 20:58]:
> 
> cons:
> - its not standard SQL (uses oracle style syntax)

Besides the GPL issue, this is my biggest problem.

> i am aware of the fact that tom lane pointed to the fact that Andrew
> Overholt did work towards SQL99 compliant recursive queries. it would be
> interesting to know andrews opinion how much more work would be needed to
> get a SQL99 compliant version out based on the work he has done so far,
> and what he thinks about Evgen potemkin's patch (i cced this mail to
> Andrew and Evgen).

My work towards SQL-standard recursive queries is nowhere near complete and
I'm sure any patches I had are severely rotten by now.  I'll try to grab
what I had and see if I can get a patch from which people can maybe pick
up.

Sorry for dropping the ball on this one.  I was back finishing up my
degree this past year and my current work isn't database-related :( .  I'll
see what I can do.  This would be a great feature for PostgreSQL.

Andrew


Re: recursive SQL

From
Potemkin Evgen
Date:
ok, i'll fix some nasty bugs, and post it here for review.

regards,
evgen
-----Original Message-----

>
>On Tue, Jun 29, 2004 at 07:23:45PM +0800, Christopher Kings-Lynne wrote:
>> I'm a PostgreSQL developer and I would like to see an SQL99 recursive 
>> queries feature in PostgreSQL.
>
>Me too, on bot parts.
>
>> I'm not a committer myself, so I think I should explain how things work. 
>>  We're unlike other projects that seem to accept almost anything that 
>> comes our way.  In many ways, it's the patches that the committers 
>> reject that make PostgreSQL strong.
>
>Actaully I am a committer and I would stil not touch that part of the
>source as I never worked on it. I just commit patches that I can
>personally judge to be good.
>
>But nevertheless I would be very interested in helping with this patch
>as recursive query optimization was one are I wokred on for my ph.d.
>
>Granted spare time is a problem, but we should be able to finish this
>for 7.6.
>
>Michael
>-- 
>Michael Meskes
>Email: Michael at Fam-Meskes dot De
>ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
>Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!
>