1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

Implement isolation levels read uncommitted and repeatable read as acting

like the next higher one.
This commit is contained in:
Peter Eisentraut
2003-11-06 22:08:15 +00:00
parent 144a2ecd57
commit 96889392e9
15 changed files with 156 additions and 69 deletions

View File

@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.88 2003/09/25 06:57:59 petere Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.89 2003/11/06 22:08:14 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -640,11 +640,21 @@ assign_XactIsoLevel(const char *value, bool doit, bool interactive)
if (doit)
XactIsoLevel = XACT_SERIALIZABLE;
}
else if (strcmp(value, "repeatable read") == 0)
{
if (doit)
XactIsoLevel = XACT_REPEATABLE_READ;
}
else if (strcmp(value, "read committed") == 0)
{
if (doit)
XactIsoLevel = XACT_READ_COMMITTED;
}
else if (strcmp(value, "read uncommitted") == 0)
{
if (doit)
XactIsoLevel = XACT_READ_UNCOMMITTED;
}
else if (strcmp(value, "default") == 0)
{
if (doit)
@ -659,10 +669,19 @@ assign_XactIsoLevel(const char *value, bool doit, bool interactive)
const char *
show_XactIsoLevel(void)
{
if (XactIsoLevel == XACT_SERIALIZABLE)
return "serializable";
else
return "read committed";
switch (XactIsoLevel)
{
case XACT_READ_UNCOMMITTED:
return "read uncommitted";
case XACT_READ_COMMITTED:
return "read committed";
case XACT_REPEATABLE_READ:
return "repeatable read";
case XACT_SERIALIZABLE:
return "serializable";
default:
return "bogus";
}
}