[SQL] Function define question

2001-08-17 Thread Bill
Hello all, Is it possible to define a function to pass parameter like this? function( parameter ) but not function( 'parameter' ) Regards Bill ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/us

[SQL] Nested set model

2001-08-17 Thread Renato De Giovanni
Hi, I'm trying the "nested set model" to handle a tree structure in a database (reference: http://www.dbmsmag.com/9603d06.html). It has many advantages if you want to select all nodes above or below a specific node (recursive calls aren't necessary), but when you want to select only the first gen

Re: [SQL] Nested JOINs - upgrade to 7.1.2

2001-08-17 Thread Oleg Lebedev
I think Tom was right and the problem with nested joins is caused by the outdated installation of my PostgreSQL. So, I am trying to upgrade to 7.1.2 and when I use: pg_dumpall -o > file.bac I get an error saying: dumpRules(): SELECT failed for table setmedias. Explanation from backend: 'ERROR: cac

[SQL] Re: how to use record type

2001-08-17 Thread Jeff Eckermann
I have encountered this problem (in a different context), and could not find a way to insert entire rows/records in the way that you appear to want. But it worked fine if I INSERTed explicitly, like: INSERT INTO table VALUES (OLD.field1, OLD.field2, ..., OLD.fieldn); That should work fine inside

[SQL] Query Approach and performance

2001-08-17 Thread Morgan Curley
Hey everyone, On average, are multiple simple queries better performance-wise than joins? i.e. select A.col1 from table1 A select B.col2 from table2 B where B.col1 = A.col1 etc vs select A.col1, B.col2 from table1 A, table2 B where B.col1 = A.col1 Are joins better for small/large numbers of tab