Re: [SQL] [GENERAL] working around setQuerySnapshot limitations in functions

2002-12-16 Thread Jakub Ouhrabka
Hi, I'm no expert on this but I think that some cases can be work around using foo updates instead of selects. See threads "LOCK TABLE oddness in PLpgSQL function called via JDBC" and "SetQuerySnapshot, once again" in the archives. But I think there is no general work around using only plpgsql. I'

[SQL] UPDATE with a SELECT and subSELECT(About comparing dates and non dates data)

2002-12-16 Thread javier garcia
Thanks Josh and Bret for your answers. But I think I can try a slightly different thing. As I said, I've got data, extracted from rain gauge stations. Perhaps I wasn't explicit enough. My source data are in this format: cod_variable | cod_station | year | month | ten | rain_day1 | wind_day1 |

Re: [SQL] CHECKS vs. BEFORE INSERT OR UPDATE TRIGGER

2002-12-16 Thread Michael Paesold
Ludwig Lim <[EMAIL PROTECTED]> wrote: >I am just wondering. Which one is executed first: > CHECK Constraints or BEFORE INSERT OR UPDATE TRIGGER? First the BEFORE... TRIGGERs, then the CHECK contraints, so you definetly can change a row in a trigger to match the contraints... Regards, Michael

[SQL] CHECKS vs. BEFORE INSERT OR UPDATE TRIGGER

2002-12-16 Thread Ludwig Lim
Hi: I am just wondering. Which one is executed first: CHECK Constraints or BEFORE INSERT OR UPDATE TRIGGER? Thank you very much, ludwig. __ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com -

[SQL] working around setQuerySnapshot limitations in functions

2002-12-16 Thread Robert Treat
I have a function called move_tree() which moves a node from 1 parent to another (in a nested set tree) by computing some necessary values, then updating the nodes as needed. The problem I have is that when the function is called multiple times simultaneously, each function does a setQuerySnapshot