On Wed, 17 Nov 2004, Achilleus Mantzios wrote:
O Oleg Bartunov ?? Nov 17, 2004 :
Gary,
if you need really fast solution for you task and dont't afraid
non-standard soltion, take a look on contrib/ltree module.
http://www.sai.msu.su/~megera/postgres/gist/ltree/
Oleg
Oleg how would you co
O Oleg Bartunov έγραψε στις Nov 17, 2004 :
> Gary,
>
> if you need really fast solution for you task and dont't afraid
> non-standard soltion, take a look on contrib/ltree module.
> http://www.sai.msu.su/~megera/postgres/gist/ltree/
>
> Oleg
Oleg how would you compare an ltree solution a
Gary,
if you need really fast solution for you task and dont't afraid
non-standard soltion, take a look on contrib/ltree module.
http://www.sai.msu.su/~megera/postgres/gist/ltree/
Oleg
On Wed, 17 Nov 2004, Gary Stainburn wrote:
On Tuesday 16 November 2004 1:08 pm, sad wrote:
On Tuesday 16
Gary,
If you're not to worried about tying yourself to Postgres and you're
sure you want to create a tree structure, you may want to check out
the ltree contrib module. It will allow you to create an index over
the entire tree, and will allow you to use real names instead of INTs
for the nodes in
On Tuesday 16 November 2004 1:08 pm, sad wrote:
> On Tuesday 16 November 2004 14:29, Gary Stainburn wrote:
> > Hi folks.
> >
> > I'm looking at the possibility of implementing a photo gallery for
> > my web site with a tree structure
> >
> > How would I go about creating a view to show a) the numbe
I'm looking at the possibility of implementing a photo gallery for my
web site with a tree structure, something like:
You don't really want a tree structure, because one day you'll want to
put the same photo in two galleries. Suppose you take a very interesting
photo of celery during your tri
On Tue, 2004-11-16 at 11:29 +, Gary Stainburn wrote:
>
> How would I go about creating a view to show a) the number of photos
> in
> a gallery and b) the timestamp of the most recent addition for a
> gallery, so that it interrogates all sub-galleries?
There isn't a very simple answer to tha
On Tuesday 16 November 2004 14:29, Gary Stainburn wrote:
> Hi folks.
>
> I'm looking at the possibility of implementing a photo gallery for my
> web site with a tree structure
> How would I go about creating a view to show a) the number of photos in
> a gallery and b) the timestamp of the most rec
Hi folks.
I'm looking at the possibility of implementing a photo gallery for my
web site with a tree structure, something like:
create table gallery (
id serial,
parent int4,
name varchar(40),
primary key (id));
create table photos (
pid serial,
id int4 references gallery not null,
added t
Frank Joerdens wrote:
>
> In a recent thread (How to represent a tree-structure in a relational
> database) I asked how to do a tree structure in SQL, and got lots of
> suggestions (thanks!), of which I chose the one below:
>
> create table Category (
> CategoryID int4 not null primary k
Josh Berkus wrote:
[ . . . ]
> This is exactly why my model includes a "Level" column.
I looked at your post from a few days ago again; you did indeed explain about the level
column. I missed that somehow and had to reinvent the wheel . . .
> > This means
> > you need a loop control structure wh
On Tue, 19 Dec 2000, Frank Joerdens wrote:
> Tulassay Zsolt wrote:
> [ . . . ]
> > The SQL stuff of that nested set structure is fairly easy, I wrote some
> > quick'n'dirty plpgsql functions that will do inserts, updates, deletes
> > from the tree, display level number etc.
>
> What scared me
Frank,
> However, I have
> a problem now
> which seems non-trivial: I am at some point in the tree,
> say 3 nodes
> down from the root, but I don't know where I am exactly
> (across which
> nodes would I travel along the shortest path to the top?)
> and would like
> to find out. This is, again, n
On Tue, 19 Dec 2000, Frank Joerdens wrote:
> Tulassay Zsolt wrote:
> [ . . . ]
> > I can send it to you if you like (please allow a few days since I
> > have several exams at the university this week).
>
> Sure, I'd like to have a look at it!
I'd like to have a look at it as well, please.
Che
> Michael Ansley wrote:
>
> Hi, Frank,
>
> This is exactly why there are alternative solutions for trees. The mechanism that
>you
> are using traded input speed for 'queryability', and this is where you start to run
>into
> problems. Either you need to store redundant information (i.e.: the
Tulassay Zsolt wrote:
[ . . . ]
> The SQL stuff of that nested set structure is fairly easy, I wrote some
> quick'n'dirty plpgsql functions that will do inserts, updates, deletes
> from the tree, display level number etc.
What scared me about it in particular was one scenario where you try to del
On Tue, 19 Dec 2000, Frank Joerdens wrote:
> In a recent thread (How to represent a tree-structure in a relational
> database) I asked how to do a tree structure in SQL, and got lots of
> suggestions (thanks!), of which I chose the one below:
>
> create table Category (
> CategoryID int4
In a recent thread (How to represent a tree-structure in a relational
database) I asked how to do a tree structure in SQL, and got lots of
suggestions (thanks!), of which I chose the one below:
create table Category (
CategoryID int4 not null primary key,
ParentCategoryID int4 not null
On Mon, Sep 11, 2000 at 01:27:48PM +0100, Trewern, Ben wrote:
> Anybody know how to make a tree structure using related tables using
> Postgres. Something like a directory structure is what I'm aiming for. I'm
> sure there is an easy way but I'm having probs.
I am not quite sure whether this is
Title: RE: [SQL] Tree structure
Any details you can supply would be appreciated. I have got a table at the moment as:
id | group_name | parentid
---
1 | Main |
2 | Group |
3 | User |
4 | Group1 | 1
5 | Group2 | 1
Thanks for your offer, I'll be very interested to see how you did that. I
also found very interesting solution at
http://www.dbmsmag.com/9603d06.html
http://www.dbmsmag.com/9604d06.html
http://www.dbmsmag.com/9605d06.html
At 11:22 12.9.2000 , kovacsz wrote:
>We are using tree structures (and par
Normally it's done with self-relation. You need a table with
"ID" and "PARENT_ID". PARENT_ID will contain null for
root level and other row's ID for children. One warning: going through
such tree could be slow. I don't know is there anything PostgreSQL
specific that might help. I know that Oracle
Title: Tree structure
Anybody know how to make a tree structure using related tables using Postgres. Something like a directory structure is what I'm aiming for. I'm sure there is an easy way but I'm having probs.
Any help would be appreciated.
Ben.
23 matches
Mail list logo