Hello. You wrote:
TL> Pavel Golub <pa...@microolap.com> writes: >> Is there any possibility that Postgres will have named transaction >> ever, like Firebird? TL> What in heck is a named transaction, and why should we care? TL> regards, tom lane Sorry guys, my bad. The thing is I'm not a Firebird adept either and this is my customer's maggot. Anyway, it's interesting, so I'll try to explain. 1. He has one connection 2. He has several scripts executed simultaneously (in different threads I think) 3. Each script must be executed inside it's own transaction In Firebird (Interbase) he may have several transactions per one connection each with it's own isolation level and parameters. Each transaction in Firebird has ID (or name?). That's why I called it "named transaction". :) Moreover Firebird allows nested transactions (http://wiki.firebirdsql.org/wiki/index.php?page=IN+AUTONOMOUS+TRANSACTION) ==== Now to implement customer's desire in PostgreSQL there are two ways: 1. Each script must be executed in the separate connection context 2. Each script must be executed inside critical section, in other words current scipt must block others until COMMIT or ROLLBACK I don't like both. ==== How I imagine "named transactions". :) START TRANSACTION first; INSERT ....; -- inside first START TRANSACTION second; DELETE ....; -- inside second SWITCH TRANSACTION first; -- switch context INSERT ....; -- inside first COMMIT; -- first terminated, default context active (no transaction) SWITCH TRANSACTION second; -- activate second transaction context COMMIT; -- second terminated, no context active So, what do you think guys? -- With best wishes, Pavel mailto:pa...@gf.microolap.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers