Re: [SQL] Is function atomic?

2001-07-07 Thread John Hasler
I wrote: Do you have any idea when [nested transactions] will [be added]? Richard Huxton writes: Check the todo list in the developers' area on the website - that'll show what's planned for 7.2 It's listed there: that's why I asked. Is everything on that list planned for 7.2? -- John

Re: [SQL] Is function atomic?

2001-07-07 Thread Peter Eisentraut
John Hasler writes: Do you have any idea when [nested transactions] will [be added]? Richard Huxton writes: Check the todo list in the developers' area on the website - that'll show what's planned for 7.2 It's listed there: that's why I asked. Is everything on that list planned for

Re: [SQL] Is function atomic?

2001-07-07 Thread Richard Huxton
From: John Hasler [EMAIL PROTECTED] Richard Huxton writes: All functions take place within a transaction, but since PG doesn't support nested transactions yet you can't roll back the effects of a nested function. Do you have any idea when it will? Check the todo list in the developers'

Re: [SQL] Is function atomic?

2001-07-06 Thread John Hasler
Richard Huxton writes: All functions take place within a transaction, but since PG doesn't support nested transactions yet you can't roll back the effects of a nested function. Do you have any idea when it will? -- John Hasler [EMAIL PROTECTED] (John Hasler) Dancing Horse Hill Elmwood, WI

Re: [SQL] Is function atomic?

2001-07-06 Thread Peter Eisentraut
Wei Weng writes: If it is not, is it possible to acquire a lock on a row ? how about a lock on a table? SQL statements issued by server-side functions operate with the same transaction isolation semantics as normal SQL statements. However, whatever the function does outside the database may

Re: [SQL] Is function atomic?

2001-07-06 Thread Peter Eisentraut
Wei Weng writes: Does that mean if I used DECLARE ... BEGIN DO_STUFF END; the DO_STUFF will not be interrupted (maintain atomicity) even when multiple threads use the function concurrently? Interruption, atomicity, and concurrency are separate issues. The function could of course be

Re: [SQL] Is function atomic?

2001-07-06 Thread Wei Weng
Does that mean if I used DECLARE ... BEGIN DO_STUFF END; the DO_STUFF will not be interrupted (maintain atomicity) even when multiple threads use the function concurrently? On 06 Jul 2001 18:13:37 +0200, Peter Eisentraut wrote: Wei Weng writes: If it is not, is it possible to acquire a

Re: [SQL] Is function atomic?

2001-07-06 Thread Richard Huxton
From: Wei Weng [EMAIL PROTECTED] If it is not, is it possible to acquire a lock on a row ? how about a lock on a table? All functions take place within a transaction, but since PG doesn't support nested transactions yet you can't roll back the effects of a nested function. - Richard Huxton

Re: [SQL] Is function atomic?

2001-07-06 Thread Wei Weng
What I wanted is simple: I don't want other processes that run the function at the same time have read/write access from the tables this function accesses(select and insert/update). Is it possible, say, let other proccess blocked on this function? On 06 Jul 2001 18:49:49 +0200, Peter Eisentraut

Re: [SQL] Is function atomic?

2001-07-06 Thread Peter Eisentraut
Wei Weng writes: What I wanted is simple: I don't want other processes that run the function at the same time have read/write access from the tables this function accesses(select and insert/update). Is it possible, say, let other proccess blocked on this function? See LOCK command. But