Re: [HACKERS] SQL99 hierarchical queries stalled

2005-05-18 Thread David Fetter
On Tue, May 17, 2005 at 11:24:19PM +0300, Hannu Krosing wrote:
> On T, 2005-05-17 at 11:22 -0400, Tom Lane wrote:
> > Hannu Krosing <[EMAIL PROTECTED]> writes:
> > > On T, 2005-05-17 at 00:42 -0400, Tom Lane wrote:
> > >> I seem to recall some discussion of how to do this in the past;
> > >> have you trolled the pghackers archives?
> > 
> > > I think that Jasons inspiration for doing it came from the the fact that
> > > there are already now abandoned patches for doing  it.
> > 
> > Having looked over the latest patch, my advice would be to ignore it :-(
> > It's almost completely devoid of documentation, except for comments
> > that he copied-and-pasted from elsewhere without modification.  Wrong
> > comments are even worse than none.
> 
> ANd even worse - this is from the README on the website:
> 
> 8<-8<-8<-8<-8<-8<-8<-
> WHAT'S THIS 
> 
> This is a patch which allows PgSQL to make hierarchical queries a la
> Oracle do.
> 
> (c) Evgen Potemkin 2003,2004, < gppl at inbox dot ru >, entirely based
> on PostgreSQL (http://www.postgresql.org)
> Patch itself distributed under GPL. No warranty of any kind is given,
> use it at your own risk.

It's the notes on the CONNECT BY patch, not the WITH patch.  The WITH
patch, as far as I can tell, is in the public domain.

Cheers,
D
-- 
David Fetter [EMAIL PROTECTED] http://fetter.org/
phone: +1 510 893 6100   mobile: +1 415 235 3778

Remember to vote!

---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
  joining column's datatypes do not match


Re: [HACKERS] SQL99 hierarchical queries stalled

2005-05-18 Thread Hannu Krosing
On T, 2005-05-17 at 11:22 -0400, Tom Lane wrote:
> Hannu Krosing <[EMAIL PROTECTED]> writes:
> > On T, 2005-05-17 at 00:42 -0400, Tom Lane wrote:
> >> I seem to recall some discussion of how to do this in the past;
> >> have you trolled the pghackers archives?
> 
> > I think that Jasons inspiration for doing it came from the the fact that
> > there are already now abandoned patches for doing  it.
> 
> Having looked over the latest patch, my advice would be to ignore it :-(
> It's almost completely devoid of documentation, except for comments
> that he copied-and-pasted from elsewhere without modification.  Wrong
> comments are even worse than none.

ANd even worse - this is from the README on the website:

8<-8<-8<-8<-8<-8<-8<-
WHAT'S THIS 

This is a patch which allows PgSQL to make hierarchical queries a la
Oracle do.

(c) Evgen Potemkin 2003,2004, < gppl at inbox dot ru >, entirely based
on PostgreSQL (http://www.postgresql.org)
Patch itself distributed under GPL. No warranty of any kind is given,
use it at your own risk.
8<-8<-8<-8<-8<-8<-8<-

So the license is also incompatible :(

-- 
Hannu Krosing <[EMAIL PROTECTED]>


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


Re: [HACKERS] SQL99 hierarchical queries stalled

2005-05-17 Thread Bruce Momjian
Tom Lane wrote:
> Hannu Krosing <[EMAIL PROTECTED]> writes:
> > On T, 2005-05-17 at 00:42 -0400, Tom Lane wrote:
> >> I seem to recall some discussion of how to do this in the past;
> >> have you trolled the pghackers archives?
> 
> > I think that Jasons inspiration for doing it came from the the fact that
> > there are already now abandoned patches for doing  it.
> 
> Having looked over the latest patch, my advice would be to ignore it :-(
> It's almost completely devoid of documentation, except for comments
> that he copied-and-pasted from elsewhere without modification.  Wrong
> comments are even worse than none.
> 
> What I'd like to see before anyone writes a line of code is a text
> document explaining how this is going to work: what's the plan tree
> structure, what happens at execution time, how much of the SQL99 spec
> is going to get implemented.  If you don't have that understanding
> first, you're going to get buried in irrelevant details.

I have updated the developer's FAQ to cover these suggestions on how to
start a patch:

  1.4) What do I do after choosing an item to work on?

  Send an email to pgsql-hackers with a proposal for what you want to do
  (assuming your contribution is not trivial). Working in isolation is not
  advisable because others might be working on the same TODO item, or you
  might have misunderstood the TODO item. In the email, discuss both the
  internal implementation method you plan to use, and any user-visible
  changes (new syntax, etc). For complex patches, it is important to get
  community feeback on your proposal before starting work. Failure to do
  so might mean your patch is rejected.

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  pgman@candle.pha.pa.us   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 6: Have you searched our list archives?

   http://archives.postgresql.org


Re: [HACKERS] SQL99 hierarchical queries stalled

2005-05-17 Thread Tom Lane
Hannu Krosing <[EMAIL PROTECTED]> writes:
> On T, 2005-05-17 at 00:42 -0400, Tom Lane wrote:
>> I seem to recall some discussion of how to do this in the past;
>> have you trolled the pghackers archives?

> I think that Jasons inspiration for doing it came from the the fact that
> there are already now abandoned patches for doing  it.

Having looked over the latest patch, my advice would be to ignore it :-(
It's almost completely devoid of documentation, except for comments
that he copied-and-pasted from elsewhere without modification.  Wrong
comments are even worse than none.

What I'd like to see before anyone writes a line of code is a text
document explaining how this is going to work: what's the plan tree
structure, what happens at execution time, how much of the SQL99 spec
is going to get implemented.  If you don't have that understanding
first, you're going to get buried in irrelevant details.

regards, tom lane

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


[HACKERS] SQL99 hierarchical queries stalled

2005-05-17 Thread jason
David--

My boss has given me approval to put up to 8 hours per week of SourceLabs'
time in on the SQL99 hierarchical query implementation.  (I'm free, of
course, to supplement this with whatever of my own time I can spare.)  I'm
willing to take on the work.  What's the next step?

--Jason


---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


Re: [HACKERS] SQL99 hierarchical queries stalled

2005-05-17 Thread Hannu Krosing
On T, 2005-05-17 at 00:42 -0400, Tom Lane wrote:
> David Fetter <[EMAIL PROTECTED]> writes:
> >> What's the next step?
> 
> > I suppose the first thing would be to look over the patches I
> > mentioned and the SQL:2003 specification, then put together a
> > preliminary patch and send it to -hackers.
...
> I seem to recall some discussion of how to do this in the past;
> have you trolled the pghackers archives?

I think that Jasons inspiration for doing it came from the the fact that
there are already now abandoned patches for doing  it.

So studying/understanding the current patch, and describing and getting
feedback from pgsql-hackers should be quite a good way of gaining
insight in trickier parts of postgres.

So it will not be jumping at new problem and writing a patch, but rather
trying to get an existing patch into good shape for being accepted in
the backend.

-- 
Hannu Krosing <[EMAIL PROTECTED]>


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [HACKERS] SQL99 hierarchical queries stalled

2005-05-16 Thread Tom Lane
David Fetter <[EMAIL PROTECTED]> writes:
>> What's the next step?

> I suppose the first thing would be to look over the patches I
> mentioned and the SQL:2003 specification, then put together a
> preliminary patch and send it to -hackers.

You can get useful feedback long before having anything that looks
like a patch --- and I'd encourage you to do so.  Send us design
notes, rough data structures, etc.

Quite honestly, hierarchical queries aren't the easiest thing in the
world and wouldn't be my recommendation of the first ... or even the
second ... backend hacking project for a new posthacker to tackle.
If that's where you feel you must start, OK, but try to get as much
feedback as soon as you can, sooner not later.

I seem to recall some discussion of how to do this in the past;
have you trolled the pghackers archives?

regards, tom lane

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [HACKERS] SQL99 hierarchical queries stalled

2005-05-16 Thread David Fetter
On Mon, May 16, 2005 at 03:09:18PM -0700, [EMAIL PROTECTED] wrote:
> David--
> 
> My boss has given me approval to put up to 8 hours per week of
> SourceLabs' time in on the SQL99 hierarchical query implementation.

That's great! :)

> (I'm free, of course, to supplement this with whatever of my own
> time I can spare.)  I'm willing to take on the work.  What's the
> next step?

I suppose the first thing would be to look over the patches I
mentioned and the SQL:2003 specification, then put together a
preliminary patch and send it to -hackers.

Cheers,
David.
-- 
David Fetter [EMAIL PROTECTED] http://fetter.org/
phone: +1 510 893 6100   mobile: +1 415 235 3778

Remember to vote!

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


Re: [Fwd: Re: [HACKERS] SQL99 Hierarchical queries]

2005-05-15 Thread David Fetter
On Sun, May 15, 2005 at 04:44:57PM +0800, Christopher Kings-Lynne wrote:
> Looks like hierarchical queries are now officially stalled :(
> 
> Anyone want to take this up for 8.1?

Sergei and Jason,

Feel like taking SQL:1999 WITH RECURSIVE?  It would be a giant help to
the PostgreSQL community. :)

http://gppl.moonbone.ru/index.shtml

has part of it, and

http://candle.pha.pa.us/mhonarc/patches2/msg00175.html

has others.

There's also MERGE, which is covered starting on page 47 of 
http://wiscorp.com/sql/SQL2003Features.pdf

also pp 839-845 of 5WD-02-Foundation-2003-09.pdf which is part of
this:
http://wiscorp.com/sql/sql_2003_standard.zip

and an overview here:
http://www.varlena.com/varlena/GeneralBits/73.php

Cheers,
D
> Hi,
> 
> I haven't done any significant progress on that way because of lack of
> free time.
> Beside this, I'm recently changed my job and now I'm woking for MySQL.
> I think it's not possible for me to continue work on PostgreSQL.
> Feel free to take the patch and develop it further as long as you
> mention me as author of initial version.
> 
> Regards, Evgen.
> 
> On 5/5/05, Christopher Kings-Lynne <[EMAIL PROTECTED]> wrote:
> >Hi Evgen,
> >
> >I just keep pinging this patch thread every once in a while to make sure
> >it doesn't get forgotten :)
> >
> >How is the syncing with 8.1 CVS coming along?
> >
> >Chris
> >
> >Evgen Potemkin wrote:
> >> Hi hackers!
> >>
> >> I have done initial implementation of SQL99 WITH clause (attached).
> >> It's now only for v7.3.4 and haven't a lot of checks and restrictions.
> >> It can execute only simple WITH queries like
> >> WITH tree AS (SELECT id,pnt,name,1::int AS level FROM t WHERE id=0
> >> UNION SELECT t.id,t.pnt,t.name,tree.level+1 FROM t JOIN tree ON
> >> tree.id=t.pnt ) SELECT * FROM tree;
> >> It would be great if someone with knowledge of Pg internals can make a
> >> kind of code review and make some advices how to better implement all
> >> this.
> >>
> >> Regards, Evgen.
> >>
> >>
> >> 
> >>
> >>
> >> ---(end of broadcast)---
> >> TIP 3: if posting/reading through Usenet, please send an appropriate
> >>   subscribe-nomail command to [EMAIL PROTECTED] so that your
> >>   message can get through to the mailing list cleanly
> >
> 
> ---(end of broadcast)---
> TIP 7: don't forget to increase your free space map settings

On Wed, May 11, 2005 at 07:01:50PM -0700, Sergey Ten wrote:
> Hello all,
> 
> We would like to contribute to the Postgresql community by implementing 
> the following items from the TODO list 
> (http://developer.postgresql.org/todo.php):
> . Allow COPY to understand \x as a hex byte . Allow COPY to optionally 
> include column headings in the first line . Add XML output to COPY
> 
> The changes are straightforward and include implementation of the 
> features as well as modification of the regression tests and documentation.
> 
> Before sending a diff file with the changes, we would like to know if 
> these features have been already implemented.
> 
> Best regards,
> Jason Lucas and Sergey Ten
> SourceLabs
> 
> Dependable Open Source Systems
> 
> 
> ---(end of broadcast)---
> TIP 2: you can get off all lists at once with the unregister command
>(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


-- 
David Fetter [EMAIL PROTECTED] http://fetter.org/
phone: +1 510 893 6100   mobile: +1 415 235 3778

Remember to vote!

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


[Fwd: Re: [HACKERS] SQL99 Hierarchical queries]

2005-05-15 Thread Christopher Kings-Lynne
Looks like hierarchical queries are now officially stalled :(
Anyone want to take this up for 8.1?
Chris
 Original Message 
Subject: Re: [HACKERS] SQL99 Hierarchical queries
Date: Sun, 15 May 2005 07:31:16 +0400
From: Evgen Potemkin <[EMAIL PROTECTED]>
Reply-To: Evgen Potemkin <[EMAIL PROTECTED]>
To: Christopher Kings-Lynne <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>	 
<[EMAIL PROTECTED]>

Hi,
I haven't done any significant progress on that way because of lack of
free time.
Beside this, I'm recently changed my job and now I'm woking for MySQL.
I think it's not possible for me to continue work on PostgreSQL.
Feel free to take the patch and develop it further as long as you
mention me as author of initial version.
Regards, Evgen.
On 5/5/05, Christopher Kings-Lynne <[EMAIL PROTECTED]> wrote:
Hi Evgen,
I just keep pinging this patch thread every once in a while to make sure
it doesn't get forgotten :)
How is the syncing with 8.1 CVS coming along?
Chris
Evgen Potemkin wrote:
> Hi hackers!
>
> I have done initial implementation of SQL99 WITH clause (attached).
> It's now only for v7.3.4 and haven't a lot of checks and restrictions.
> It can execute only simple WITH queries like
> WITH tree AS (SELECT id,pnt,name,1::int AS level FROM t WHERE id=0
> UNION SELECT t.id,t.pnt,t.name,tree.level+1 FROM t JOIN tree ON
> tree.id=t.pnt ) SELECT * FROM tree;
> It would be great if someone with knowledge of Pg internals can make a
> kind of code review and make some advices how to better implement all
> this.
>
> Regards, Evgen.
>
>
> 
>
>
> ---(end of broadcast)---
> TIP 3: if posting/reading through Usenet, please send an appropriate
>   subscribe-nomail command to [EMAIL PROTECTED] so that your
>   message can get through to the mailing list cleanly
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


Re: [HACKERS] SQL99 Hierarchical queries

2005-05-04 Thread Christopher Kings-Lynne
Hi Evgen,
I just keep pinging this patch thread every once in a while to make sure 
it doesn't get forgotten :)

How is the syncing with 8.1 CVS coming along?
Chris
Evgen Potemkin wrote:
Hi hackers!
I have done initial implementation of SQL99 WITH clause (attached).
It's now only for v7.3.4 and haven't a lot of checks and restrictions.
It can execute only simple WITH queries like
WITH tree AS (SELECT id,pnt,name,1::int AS level FROM t WHERE id=0
UNION SELECT t.id,t.pnt,t.name,tree.level+1 FROM t JOIN tree ON
tree.id=t.pnt ) SELECT * FROM tree;
It would be great if someone with knowledge of Pg internals can make a
kind of code review and make some advices how to better implement all
this.
Regards, Evgen.

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
 subscribe-nomail command to [EMAIL PROTECTED] so that your
 message can get through to the mailing list cleanly


Re: [HACKERS] SQL99 Hierarchical queries

2005-03-11 Thread Evgen Potemkin
> Hi Evgen,
> 
> How's the syncing with HEAD going?
> 
> Cheers,
> 
> Chris
I'm working on it.

Regards, Evgen.

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


Re: [HACKERS] SQL99 Hierarchical queries

2005-03-10 Thread Christopher Kings-Lynne
Hi Evgen,
How's the syncing with HEAD going?
Cheers,
Chris
Evgen Potemkin wrote:
Ok, I'm started porting it to 8.0.1 and will fix this also. 
By the way, did you know any test suit for such queries? To make some
regression test.

Regards, Evgen
I tested you patch, and it's good work. I would all methods in PostgreSQL.
I found query which kill backand
WITH t AS (
 SELECT 0::int AS i
 UNION ALL SELECT i + 1 FROM t WHERE i < 100)
SELECT * FROM t;
Regards
Pavel Stehule


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
   http://www.postgresql.org/docs/faq
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [HACKERS] SQL99 Hierarchical queries

2005-03-04 Thread Evgen Potemkin
Hello hackers,
> Thanks very much for doing this work.  Is there some way you can
> summarize what you did so others can join you in working on it?  If it
> is easier for you to write this in some language other than English,
> please do, and we'll find translators :)
> 
> I noticed that the patch touches the parser, the optimizer and the
> executor.  What does it to with each?  What did I miss?
> 
This is some info about implementations.

Parser.
 WITH aliased queries stored as list of SUBQUERY nodes. Each of
them is parsed as usually. In pstate->withClause already analyzed part
of WITH queries list is stored. When next WITH subquery is analyzed,
it's been added to subqueries list inside withClause node, so any WITH
subquery can see al prevoius WITH subqueries.
In FROM clause all WITH aliases represented by special type of
RangTblEntry - RTE_WITH_SUBQUERY. It stores a reference to WithClause
node and index of itself in QITH subqueries list.
For analyzing var added step to search in WITH aliases if they are present.
Recursiveness support. Before WITH subquery analyzing in
pstate->withClause->calias  stored it's alias. So when transforming
FROM clause item and relation name found only in
pstate->withClause->calias query marked as recursive. SQL99 recursive
queries are made using UNION and first UNION subquery should be non
recursive (this isn't currently checked). Thus when transforming set
operation statement, after analyzing of first statement it's is RTE
stored in pstate->withClause->cRTE, and all checks for vars in this
WITH subquery in made against this RTE.

Optimizer.
WithClause node transformed to With node, scan of RTEs of type
RTE_WITH_SUBQUERY to WithScan nodes. Each WITH subquery is enveloped
into WithSubPlan node. It stores result and working tuplestores, and
some flags (used for prevent double initialization and execution) for
each subquery.
Nothing extraordinary is done here.

Executor.
When executor tries to fetch first tuple from any WithScan node,
this node check whether With node have been executed, if no then it
executes it and then fetches all it's tuples from it's result
tuplestore.
"With" node being executed is simply call ExecNode on each subplan
in it's list and storing tuples in result tuplestore.
Recursiveness support. It's all done in Append node. If it marked
as recusrive, it changes a little it's behaviour.
Tuples fetched from subplan are stored in workin table. When
Append reaches the end of list of its subqueries it call
nodeWithSwitchTables. This function for query being executed will
append result table to final table, move working table to result
table, and clean working table. After this Append begins next loop of
subqueries execution, starting from 2nd subquery. Thus first Append
subquery is executed only once. Execution ends when no one tuple
fetched from all subqueries.
This approach allows WithScan nodes to fetch data fetched by
Append in previous loop.

Regards, Evgen.

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


Re: [HACKERS] SQL99 Hierarchical queries

2005-03-01 Thread Evgen Potemkin
> Thanks very much for doing this work.  Is there some way you can
> summarize what you did so others can join you in working on it?  If it
> is easier for you to write this in some language other than English,
> please do, and we'll find translators :)
> 
> I noticed that the patch touches the parser, the optimizer and the
> executor.  What does it to with each?  What did I miss?
> 
> Cheers,
> D

Ok, i'll make some doc on this topic.

Regards, Evgen

---(end of broadcast)---
TIP 6: Have you searched our list archives?

   http://archives.postgresql.org


Re: [HACKERS] SQL99 Hierarchical queries

2005-03-01 Thread Evgen Potemkin
> > Ok, I'm started porting it to 8.0.1 and will fix this also.
> > By the way, did you know any test suit for such queries? To make some
> > regression test.
> >
> Hello, I can find some examples on internet and prepare regression tests.
> I think PostgreSQL can support all syntax H.Q. Is more easy created
> question via Oracle syntax, and processing is faster (maybe better
> optimalisation now), than ANSI WITH syntax. Can You add support for
> clausule VALUE?
> 
> Pavel Stehule

On this  weekend I'll see to DB2 reference and if there some
description on what is it, I'll try to implement it.

Regards, Evgen.

---(end of broadcast)---
TIP 6: Have you searched our list archives?

   http://archives.postgresql.org


Re: [HACKERS] SQL99 Hierarchical queries

2005-02-28 Thread Josh Berkus
Mike,

> I'm curious what kind of performance differences there would be over
> using something like the nested-set model?
>
> Would this be faster, or slower?

The answer is "yes".;-)

Which tree structures you use depends on what you're trying to accomplish and 
what your use case is.   There are some structures (for example, heirarchical 
org charts) for which nested sets can't be beat.   There are plenty of 
reasons to implement other tree structures, such as graphs, cycles, and 
delimited lists depending on what you're trying to depict.   

What WITH is going to "replace", if anything, is the simple adjacency list 
structure.

-- 
Josh Berkus
Aglio Database Solutions
San Francisco

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [HACKERS] SQL99 Hierarchical queries

2005-02-28 Thread Pavel Stehule
On Mon, 28 Feb 2005, Evgen Potemkin wrote:

> Ok, I'm started porting it to 8.0.1 and will fix this also. 
> By the way, did you know any test suit for such queries? To make some
> regression test.
> 
Hello, I can find some examples on internet and prepare regression tests. 
I think PostgreSQL can support all syntax H.Q. Is more easy created 
question via Oracle syntax, and processing is faster (maybe better 
optimalisation now), than ANSI WITH syntax. Can You add support for 
clausule VALUE?

Pavel Stehule


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


Re: [HACKERS] SQL99 Hierarchical queries

2005-02-28 Thread Mike Benoit
I'm curious what kind of performance differences there would be over
using something like the nested-set model?

Would this be faster, or slower?

On Thu, 2005-02-24 at 13:02 +0300, Evgen Potemkin wrote:
> Hi hackers!
> 
> I have done initial implementation of SQL99 WITH clause (attached).
> It's now only for v7.3.4 and haven't a lot of checks and restrictions.
> It can execute only simple WITH queries like
> WITH tree AS (SELECT id,pnt,name,1::int AS level FROM t WHERE id=0
> UNION SELECT t.id,t.pnt,t.name,tree.level+1 FROM t JOIN tree ON
> tree.id=t.pnt ) SELECT * FROM tree;
> It would be great if someone with knowledge of Pg internals can make a
> kind of code review and make some advices how to better implement all
> this.
> 
> Regards, Evgen.
> ---(end of broadcast)---
> TIP 3: if posting/reading through Usenet, please send an appropriate
>   subscribe-nomail command to [EMAIL PROTECTED] so that your
>   message can get through to the mailing list cleanly
-- 
Mike Benoit <[EMAIL PROTECTED]>


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


Re: [HACKERS] SQL99 Hierarchical queries

2005-02-28 Thread David Fetter
On Mon, Feb 28, 2005 at 11:07:51AM +0300, Evgen Potemkin wrote:

> Ok, I'm started porting it to 8.0.1 and will fix this also.  By the
> way, did you know any test suit for such queries? To make some
> regression test.

Evgen,

Thanks very much for doing this work.  Is there some way you can
summarize what you did so others can join you in working on it?  If it
is easier for you to write this in some language other than English,
please do, and we'll find translators :)

I noticed that the patch touches the parser, the optimizer and the
executor.  What does it to with each?  What did I miss?

Cheers,
D
-- 
David Fetter [EMAIL PROTECTED] http://fetter.org/
phone: +1 510 893 6100   mobile: +1 415 235 3778

Remember to vote!

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [HACKERS] SQL99 Hierarchical queries

2005-02-28 Thread Evgen Potemkin
Ok, I'm started porting it to 8.0.1 and will fix this also. 
By the way, did you know any test suit for such queries? To make some
regression test.

Regards, Evgen
> I tested you patch, and it's good work. I would all methods in PostgreSQL.
> I found query which kill backand
> 
> WITH t AS (
>   SELECT 0::int AS i
>   UNION ALL SELECT i + 1 FROM t WHERE i < 100)
> SELECT * FROM t;
> 
> Regards
> Pavel Stehule
> 
>

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [HACKERS] SQL99 Hierarchical queries

2005-02-27 Thread Pavel Stehule
hello, 

I tested you patch, and it's good work. I would all methods in PostgreSQL. 
I found query which kill backand

WITH t AS (
  SELECT 0::int AS i 
  UNION ALL SELECT i + 1 FROM t WHERE i < 100)
SELECT * FROM t;

Regards
Pavel Stehule


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [HACKERS] SQL99 Hierarchical queries

2005-02-24 Thread Evgen Potemkin
> > I have done initial implementation of SQL99 WITH clause (attached).
> > It's now only for v7.3.4 and haven't a lot of checks and restrictions.
> 
> What kind of restrictions are on it?
Main restriction is that the query inside WITH alias can refer only to
back and to itself.
For example 
WITH a as (...),b as (...)select ...;
a can refer only to itself, b - to a and b.

Its needed to restrict WITH aliased query not to use WITH aliasing
itself, i.e. avoid situation of WITH inside WITH. And make also some
other checks. But this isn't done yet.

Regards, Evgen.

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


Re: [HACKERS] SQL99 Hierarchical queries

2005-02-24 Thread Christopher Kings-Lynne
I have done initial implementation of SQL99 WITH clause (attached).
It's now only for v7.3.4 and haven't a lot of checks and restrictions.
What kind of restrictions are on it?
Chris
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
   (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])