Re: [SQL] [Fwd: SQL book]
Jodi, get some of Joe Celco books for me they where extreemly usefull. Ries ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
[SQL] unsubscribe
---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [SQL] plpgsql recursion
Can you post the recursion function that you use on this case to get out the information from the table ? Thanks, Luis Sousa Stefano Vita Finzi wrote: Greetings! I have a table like: node parent 1 2 2 3 3 4 Since i traverse this table with a recursive function, i want to avoid infinite recursion loop. I have wrote a function to check that a new record does not create a circular dependency. The function i wrote is as follow: CREATE OR REPLACE FUNCTION dba_test(INTEGER,INTEGER) RETURNS TEXT AS ' DECLARE traversing ALIAS FOR $1; testing ALIAS FOR $2; t_rec RECORD; BEGIN FOR t_rec IN SELECT node,parent FROM dba_test WHERE parent = traversing LOOP IF t_rec.node = testing THEN RETURN ''Circular''; ELSE PERFORM dba_test(t_rec.node,testing); END IF; END LOOP; RETURN ''ok'' || testing::text; END; ' LANGUAGE 'plpgsql'; I would use this function BEFORE inserting the new row. But if i try SELECT dba_test(4,1); i don't have the result i expect. Can i you give me an hint where am i wrong? Thank you! Stefano Vita Finzi [EMAIL PROTECTED] ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED] ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
[SQL] Inheritance and Referencial Integrity
I'm using 7.3.2 which extends the inheritance of some checks and triggers to inherited tables, but still falls short of foreign key referencees looking into child tables. Are there plans to address these defficencies and when might we see this take place. Thanks Stuart ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
[SQL]
[EMAIL PROTECTED] Cc: Bcc: Subject: Re: [PERFORM] [SQL] Unanswered Questions WAS: An unresolved performance Reply-To: [EMAIL PROTECTED] In-Reply-To: <[EMAIL PROTECTED]> X-Operating-System: Linux/2.4.18-686-smp (i686) X-Uptime: 21:03:03 up 8 days, 22:55, 8 users, load average: 1.00, 1.00, 1.00 * scott.marlowe ([EMAIL PROTECTED]) wrote: > On Thu, 8 May 2003, johnn wrote: > > > > I hate to point this out, but "TIP 4" is getting a bit old and the 6 > > Also, some tips might well cross over, like say, vacuum and analyze > regularly. Hmmm. Sounds like a job for a relational database :-) Did this get carried any further? I'd love to see something come out of it. But I'd really like to see more of the kind of tricks and tips, like how to dump all databases using a script of 3 lines(?) I'm sure I've seen it before. The extra lines I don't think would be a major pain given the added value. Even if it's too much, how about somewhere on techdocs for the script and a link in the tips 'n tricks line? Pete :wq ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster