Re: [SQL]Linked List

2006-04-30 Thread Ben K.
The pgsql function is compiled and wouldn't know how to handle a table name as a variable. If you rewrite the SQL to use the 'EXECUTE' statement I think you could do this, something along the lines of (untested): EXECUTE ''INSERT INTO '' || quote_ident(tmplist) || '' (SELECT * FROM links WHE

Re: [SQL]Linked List

2006-04-30 Thread Gregory S. Williamson
Ben, The pgsql function is compiled and wouldn't know how to handle a table name as a variable. If you rewrite the SQL to use the 'EXECUTE' statement I think you could do this, something along the lines of (untested): EXECUTE ''INSERT INTO '' || quote_ident(tmplist) || '' (SELECT * FROM links

Re: [SQL]Linked List

2006-04-30 Thread Ben K.
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. The table contains many linked lists based upon the head of the list and I need to extract all of the nodes that make up a list.

Re: [SQL] Multi-Column Constraints and Null Values

2006-04-30 Thread Tornroth, Phill
Wow. This is great feedback. As for more than two columns.. I don't think I have more than two nullable columns. Often I have a three or four column constraint where only one or two of them are nullable. I've never used constraints or indexes with where clauses. I'll have to play with this a bit