From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | SET LOCAL again |
Date: | 2002-07-25 20:55:21 |
Message-ID: | Pine.LNX.4.44.0207252139240.1144-100000@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)gmx(dot)net
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2002-07-25 20:56:02 | Which casts should be implicit |
Previous Message | Peter Eisentraut | 2002-07-25 20:54:53 | Re: CREATE SYNONYM suggestions |