Re: [GENERAL] Hierarchical queries

2004-01-13 Thread Anton . Nikiforov
Hello Everybody! Now i did what i was requesting :) One night with a computer :)) Many-many thanks to all of you :) Below is script to create tables and function to get a path through a tree. It is not a beautiful thing, but it is working :) Maybe you could give me some optimization hints? :) And m

Re: [GENERAL] Hierarchical queries

2004-01-12 Thread Anton . Nikiforov
Thanks Graeme! MG> http://marc.theaimsgroup.com/?l=postgresql-sql&m=106739176106877&w=2 But this function is still returning only a subtree and in addition it have a bug when calling it like SELECT * FROM crawl_tree(0,0); You will always get ERROR: out of memory But this function is clear enough t

Re: [GENERAL] Hierarchical queries

2004-01-11 Thread Merrall, Graeme
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Saturday, 10 January 2004 6:05 AM > To: [EMAIL PROTECTED] > Subject: [GENERAL] Hierarchical queries > > > Hello everybody! > > Does someone know how to build hierarchical queries to the postgresql? > Th

Re: [GENERAL] Hierarchical queries

2004-01-11 Thread Anton . Nikiforov
Thanks Joe, But this function is not giving a path from one element to other, it is just truncating the tree beginning from the start element, but it is not rotating the whole tree making starting element a tree's root. JC> See contrib/tablefunc for a function called connectby(). Regards, Anton

Re: [GENERAL] Hierarchical queries

2004-01-10 Thread Joe Conway
[EMAIL PROTECTED] wrote: RH> I could have sworn there was something in contrib/ too, but I can't see it RH> now. Yes it is gone. :) See contrib/tablefunc for a function called connectby(). Joe ---(end of broadcast)--- TIP 5: Have you checked our ex

Re: [GENERAL] Hierarchical queries

2004-01-10 Thread Anton . Nikiforov
Hello Oleg! There is no data yet, i'm just planning to start a new project :) Text labels are just fine and i red the documentation from the top to the very end a few times and found the way to use your module, but using it will not as beautiful as i was planning mathematicaly. You know i have (pla

Re: [GENERAL] Hierarchical queries

2004-01-10 Thread Oleg Bartunov
On Sat, 10 Jan 2004 [EMAIL PROTECTED] wrote: > Hello Oleg and thanks for the link, but i could not understand how to > get path from one point of the tree to another? have you read documentation ? Get all childrens - ltree <@ ltree, for example: ltreetest=# select path from test where path <@ 'T

Re: [GENERAL] Hierarchical queries

2004-01-10 Thread Anton . Nikiforov
Hello Oleg and thanks for the link, but i could not understand how to get path from one point of the tree to another? Anyway thanks :) Best regards, Anton OB> Look at contrib/ltree OB> http://www.sai.msu.su/~megera/postgres/gist/ltree OB> Oleg OB> On Fri, 9 Jan 2004 [EMAIL PROTECTED] wrot

Re: [GENERAL] Hierarchical queries

2004-01-10 Thread Anton . Nikiforov
Hello and thanks for the links, but >> http://www.brasileiro.net/postgres/cookbook. this site is still down or at least do not accsepting requests, and RH> http://gppl.terminal.ru/index.eng.html this patch is not working with my 7.4 release, i tried hier-0.3, but cannot compile my postgres with

Re: [GENERAL] Hierarchical queries

2004-01-10 Thread Oleg Bartunov
Look at contrib/ltree http://www.sai.msu.su/~megera/postgres/gist/ltree Oleg On Fri, 9 Jan 2004 [EMAIL PROTECTED] wrote: > Hello everybody! > > Does someone know how to build hierarchical queries to the postgresql? > > I have a table with tree in it (id, parent) > and need to find a way f

Re: [GENERAL] Hierarchical queries

2004-01-09 Thread Richard Huxton
On Friday 09 January 2004 19:16, Andrew Rawnsley wrote: > There's a patch to mimic Oracle's CONNECT BY queries. You can get it > at the Postgres Cookbook site: > > http://www.brasileiro.net/postgres/cookbook. I believe I saw an announcement on freshmeat about a patch for the source to allow Oracl

Re: [GENERAL] Hierarchical queries

2004-01-09 Thread Andrew Rawnsley
There's a patch to mimic Oracle's CONNECT BY queries. You can get it at the Postgres Cookbook site: http://www.brasileiro.net/postgres/cookbook. (although it seems to be down at the moment...) On Jan 9, 2004, at 2:05 PM, [EMAIL PROTECTED] wrote: Hello everybody! Does someone know how to build h