Re: [SQL] Migrating a Database to a new tablespace

2006-04-26 Thread Markus Schaber
Hi, Tom, Tom Lane wrote: > Match the subdirectory names against pg_database.oid --- any subdir that > doesn't correspond to any live entry in pg_database is junk and can be > flushed. Within a valid database's subdirectory, match the file names > to that database's pg_class.relfilenode (not oid!

[SQL] LinkedList

2006-04-26 Thread Ray Madigan
I have a table that I created that implements a linked list. I am not an expert SQL developer and was wondering if there are known ways to traverse the linked lists. Any information that can point me in the direction to figure this out would be appreciated. The table contains many linked lists b

Re: [SQL] LinkedList

2006-04-26 Thread Scott Marlowe
On Wed, 2006-04-26 at 11:09, Ray Madigan wrote: > I have a table that I created that implements a linked list. I am not an > expert SQL developer and was wondering if there are known ways to traverse > the linked lists. Any information that can point me in the direction to > figure this out would

Re: [SQL] Migrating a Database to a new tablespace

2006-04-26 Thread Tom Lane
Markus Schaber <[EMAIL PROTECTED]> writes: > As I said the leftovers are likely to be caused by hard kills and > backend crashes, so I would not go into deeper analysis, but maybe the > finding and possibly removing of such leftovers should be half-automated > to assist server admins. It's been di

Re: [SQL] Migrating a Database to a new tablespace

2006-04-26 Thread Bruce Momjian
Tom Lane wrote: > Markus Schaber <[EMAIL PROTECTED]> writes: > > As I said the leftovers are likely to be caused by hard kills and > > backend crashes, so I would not go into deeper analysis, but maybe the > > finding and possibly removing of such leftovers should be half-automated > > to assist se

Re: [SQL] LinkedList

2006-04-26 Thread Ray Madigan
Scott, Thanks for your reply, I tried what you said, worked around a few things but I am still stuck. The main reason is I didn't do an adequate job of explaining the situation. The table implements many linked lists and I want to traverse one of them given the end of the list. Say the table c

Re: [SQL] Migrating a Database to a new tablespace

2006-04-26 Thread Jim C. Nasby
On Wed, Apr 26, 2006 at 12:35:39PM -0400, Bruce Momjian wrote: > Tom Lane wrote: > > Markus Schaber <[EMAIL PROTECTED]> writes: > > > As I said the leftovers are likely to be caused by hard kills and > > > backend crashes, so I would not go into deeper analysis, but maybe the > > > finding and poss

Re: [SQL] LinkedList

2006-04-26 Thread Jim C. Nasby
decibel=# select * from t; a | b ---+--- 1 | 0 3 | 1 5 | 3 7 | 5 2 | 0 4 | 2 6 | 4 8 | 6 (8 rows) decibel=# select * from t x join t y on(x.a=y.b) where y.a=7; a | b | a | b ---+---+---+--- 5 | 3 | 7 | 5 (1 row) decibel=# select * from t x join t y on(x.a=y.b) where y.a=8; a | b | a