SET LOCAL again
От | Peter Eisentraut |
---|---|
Тема | SET LOCAL again |
Дата | |
Msg-id | Pine.LNX.4.44.0207252139240.1144-100000@localhost.localdomain обсуждение исходный текст |
Ответы |
Re: SET LOCAL again
|
Список | pgsql-hackers |
Earlier I had argued that SET LOCAL should not be used in the context it is now, and I had suggested SET TRANSACTION as a replacement. However, now that I look at it in the implementation, this syntax is just too bizzare and prone to confuse. Here are a couple of examples of what is/would be possible. SET SESSION SESSION AUTHORIZATION (This is semantically valid, since the parameter is the "session authorization" and you want it to last for the session.) SET TRANSACTION SESSION AUTHORIZATION (Clearly confusing) SET SESSION TRANSACTION ISOLATION LEVEL (Syntactically valid, but nonsensical.) SET TRANSACTION TRANSACTION ISOLATION LEVEL (Stupid) SET TRANSACTION ISOLATION LEVEL (This seems to imply that the parameter name is "isolation level" whereas in fact the "transaction" belongs to the parameter name.) SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL SET TRANSACTION SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL (OK, you get the idea...) As an alternative syntax I can suggest SET name TO value [ ON COMMIT RESET ]; I think this is painfully clear, is similar to other SQL standard commands, and draws on existing terminology (COMMIT/RESET). OK, slightly more typing, I guess. Comments? -- Peter Eisentraut peter_e@gmx.net
В списке pgsql-hackers по дате отправления: