[GENERAL] what's the exact command definition in read committed isolation level?

2016-04-17 Thread Jinhua Luo
ion committed after the second run of subquery, which modified table bar, does the third run of subquery see the new data? I could not find any answer from the official documents, so could anybody help to answer them? Thanks! Regards, Jinhua Luo -- Sent via pgsql-general mailing list (

Re: [GENERAL] what's the exact command definition in read committed isolation level?

2016-04-18 Thread Jinhua Luo
Let me clarify my question a bit more (I don't know why nobody raises such question): For trigger, e.g. written in pl/pgsql, each sql command within the function may see more new data beyond the (entry) snapshot of outer command. So if the "command" term in the read committed isolation level only

Re: [GENERAL] Re: what's the exact command definition in read committed isolation level?

2016-04-18 Thread Jinhua Luo
> Does that mean a VOLATILE function runs in a different transaction? No, all statements triggered by the outer statement is within the same transaction. If the trigger fails (without trapping the error), all affects including changes by outer statement would be rollback. > And does that mean it

Re: [GENERAL] Re: what's the exact command definition in read committed isolation level?

2016-04-19 Thread Jinhua Luo
> > First session: > postgres=# create table t(id integer); > CREATE TABLE > postgres=# insert into t values (1); > INSERT 0 1 > postgres=# begin; > BEGIN > postgres=# select count(*) from t; > count > --- > 1 > (1 row) > > 1 row in the table. In another session, insert another row in t:

Re: [GENERAL] Re: what's the exact command definition in read committed isolation level?

2016-04-19 Thread Jinhua Luo
2016-04-18 23:16 GMT+08:00 Tom Lane : > > No, that's not true: a trigger is a function and what it can see is > determined by the rules of the PL it's written in. Typically a > function that's marked STABLE or IMMUTABLE will see the same snapshot > as the calling query, but a function that's VOLAT

[GENERAL] How does postgresql jdbc driver implement prepared batch?

2016-04-20 Thread Jinhua Luo
batch size is enough. What's the final statement does postgresql jdbc driver convert to? I'm so curious. I'm not familiar with jdbc, and although I check the driver source codes, but I still cannot understand it. Anybody knows the answer? Thanks. Regards, Jinhua Luo -- Sent

Re: [GENERAL] Background worker with Listen

2016-04-26 Thread Jinhua Luo
Why not use libpq in worker? i.e. your worker works just like a pure PG client. In my project, I uses worker in this way and it works well. I do not use any backend API to access the database. 2016-04-21 15:51 GMT+08:00 Ihnat Peter | TSS Group a.s. : > I am trying to create background worker whic