99 *
1010 *
1111 * IDENTIFICATION
12- * $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.50 2001/06/12 22:54:05 tgl Exp $
12+ * $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.51 2001/06/30 22:03:25 petere Exp $
1313 *
1414 *-------------------------------------------------------------------------
1515 */
@@ -46,9 +46,6 @@ static bool show_timezone(void);
4646static bool reset_timezone (void );
4747static bool parse_timezone (char * );
4848
49- static bool show_DefaultXactIsoLevel (void );
50- static bool reset_DefaultXactIsoLevel (void );
51- static bool parse_DefaultXactIsoLevel (char * );
5249static bool show_XactIsoLevel (void );
5350static bool reset_XactIsoLevel (void );
5451static bool parse_XactIsoLevel (char * );
@@ -448,69 +445,6 @@ reset_timezone(void)
448445
449446/* SET TRANSACTION */
450447
451- static bool
452- parse_DefaultXactIsoLevel (char * value )
453- {
454- #if 0
455- TransactionState s = CurrentTransactionState ;
456-
457- #endif
458-
459- if (value == NULL )
460- {
461- reset_DefaultXactIsoLevel ();
462- return TRUE;
463- }
464-
465- #if 0
466- if (s -> state != TRANS_DEFAULT )
467- {
468- elog (ERROR , "ALTER SESSION/SET TRANSACTION ISOLATION LEVEL"
469- " can not be called within a transaction" );
470- return TRUE;
471- }
472- #endif
473-
474- if (strcasecmp (value , "SERIALIZABLE" ) == 0 )
475- DefaultXactIsoLevel = XACT_SERIALIZABLE ;
476- else if (strcasecmp (value , "COMMITTED" ) == 0 )
477- DefaultXactIsoLevel = XACT_READ_COMMITTED ;
478- else
479- elog (ERROR , "Bad TRANSACTION ISOLATION LEVEL (%s)" , value );
480-
481- return TRUE;
482- }
483-
484- static bool
485- show_DefaultXactIsoLevel (void )
486- {
487-
488- if (DefaultXactIsoLevel == XACT_SERIALIZABLE )
489- elog (NOTICE , "Default TRANSACTION ISOLATION LEVEL is SERIALIZABLE" );
490- else
491- elog (NOTICE , "Default TRANSACTION ISOLATION LEVEL is READ COMMITTED" );
492- return TRUE;
493- }
494-
495- static bool
496- reset_DefaultXactIsoLevel (void )
497- {
498- #if 0
499- TransactionState s = CurrentTransactionState ;
500-
501- if (s -> state != TRANS_DEFAULT )
502- {
503- elog (ERROR , "ALTER SESSION/SET TRANSACTION ISOLATION LEVEL"
504- " can not be called within a transaction" );
505- return TRUE;
506- }
507- #endif
508-
509- DefaultXactIsoLevel = XACT_READ_COMMITTED ;
510-
511- return TRUE;
512- }
513-
514448static bool
515449parse_XactIsoLevel (char * value )
516450{
@@ -530,7 +464,7 @@ parse_XactIsoLevel(char *value)
530464
531465 if (strcasecmp (value , "SERIALIZABLE" ) == 0 )
532466 XactIsoLevel = XACT_SERIALIZABLE ;
533- else if (strcasecmp (value , "COMMITTED" ) == 0 )
467+ else if (strcasecmp (value , "READ COMMITTED" ) == 0 )
534468 XactIsoLevel = XACT_READ_COMMITTED ;
535469 else
536470 elog (ERROR , "Bad TRANSACTION ISOLATION LEVEL (%s)" , value );
@@ -711,8 +645,6 @@ SetPGVariable(const char *name, const char *value)
711645 parse_datestyle (mvalue );
712646 else if (strcasecmp (name , "timezone" ) == 0 )
713647 parse_timezone (mvalue );
714- else if (strcasecmp (name , "DefaultXactIsoLevel" ) == 0 )
715- parse_DefaultXactIsoLevel (mvalue );
716648 else if (strcasecmp (name , "XactIsoLevel" ) == 0 )
717649 parse_XactIsoLevel (mvalue );
718650 else if (strcasecmp (name , "client_encoding" ) == 0 )
@@ -737,8 +669,6 @@ GetPGVariable(const char *name)
737669 show_datestyle ();
738670 else if (strcasecmp (name , "timezone" ) == 0 )
739671 show_timezone ();
740- else if (strcasecmp (name , "DefaultXactIsoLevel" ) == 0 )
741- show_DefaultXactIsoLevel ();
742672 else if (strcasecmp (name , "XactIsoLevel" ) == 0 )
743673 show_XactIsoLevel ();
744674 else if (strcasecmp (name , "client_encoding" ) == 0 )
@@ -752,7 +682,6 @@ GetPGVariable(const char *name)
752682 ShowAllGUCConfig ();
753683 show_datestyle ();
754684 show_timezone ();
755- show_DefaultXactIsoLevel ();
756685 show_XactIsoLevel ();
757686 show_client_encoding ();
758687 show_server_encoding ();
@@ -772,8 +701,6 @@ ResetPGVariable(const char *name)
772701 reset_datestyle ();
773702 else if (strcasecmp (name , "timezone" ) == 0 )
774703 reset_timezone ();
775- else if (strcasecmp (name , "DefaultXactIsoLevel" ) == 0 )
776- reset_DefaultXactIsoLevel ();
777704 else if (strcasecmp (name , "XactIsoLevel" ) == 0 )
778705 reset_XactIsoLevel ();
779706 else if (strcasecmp (name , "client_encoding" ) == 0 )
@@ -784,16 +711,15 @@ ResetPGVariable(const char *name)
784711 reset_random_seed ();
785712 else if (strcasecmp (name , "all" ) == 0 )
786713 {
787- reset_DefaultXactIsoLevel ();
788- reset_XactIsoLevel ();
789714 reset_random_seed ();
790715 /* reset_server_encoding(); */
791716 reset_client_encoding ();
792717 reset_datestyle ();
793718 reset_timezone ();
794719
795720 ResetAllOptions (false);
796- } else
721+ }
722+ else
797723 SetConfigOption (name , NULL ,
798724 superuser () ? PGC_SUSET : PGC_USERSET ,
799725 false);
0 commit comments