|
9 | 9 | *
|
10 | 10 | *
|
11 | 11 | * IDENTIFICATION
|
12 |
| - * $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.63 2002/04/21 21:35:17 thomas Exp $ |
| 12 | + * $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.64 2002/04/22 14:34:27 thomas Exp $ |
13 | 13 | *
|
14 | 14 | *-------------------------------------------------------------------------
|
15 | 15 | */
|
@@ -593,7 +593,8 @@ parse_XactIsoLevel(List *args)
|
593 | 593 | Assert(IsA(args,List));
|
594 | 594 | Assert(IsA(lfirst(args),A_Const));
|
595 | 595 | /* Should only get one argument from the parser */
|
596 |
| -Assert(lnext(args)==NIL); |
| 596 | +if (lnext(args)!=NIL) |
| 597 | +elog(ERROR,"SET TRANSACTION ISOLATION LEVEL does not allow multiple arguments"); |
597 | 598 |
|
598 | 599 | Assert(((A_Const*)lfirst(args))->val.type=T_String);
|
599 | 600 | value= ((A_Const*)lfirst(args))->val.val.str;
|
@@ -655,7 +656,8 @@ parse_random_seed(List *args)
|
655 | 656 |
|
656 | 657 | Assert(IsA(args,List));
|
657 | 658 | /* Should only get one argument from the parser */
|
658 |
| -Assert(lnext(args)==NIL); |
| 659 | +if (lnext(args)!=NIL) |
| 660 | +elog(ERROR,"SET SEED does not allow multiple arguments"); |
659 | 661 |
|
660 | 662 | p=lfirst(args);
|
661 | 663 | Assert(IsA(p,A_Const));
|
@@ -717,6 +719,9 @@ parse_client_encoding(List *args)
|
717 | 719 | if (args==NULL)
|
718 | 720 | returnreset_client_encoding();
|
719 | 721 |
|
| 722 | +if (lnext(args)!=NIL) |
| 723 | +elog(ERROR,"SET CLIENT ENCODING does not allow multiple arguments"); |
| 724 | + |
720 | 725 | Assert(IsA(lfirst(args),A_Const));
|
721 | 726 | if (((A_Const*)lfirst(args))->val.type!=T_String)
|
722 | 727 | {
|
@@ -844,7 +849,8 @@ SetPGVariable(const char *name, List *args)
|
844 | 849 |
|
845 | 850 | /* Ensure one argument only... */
|
846 | 851 | if (lnext(args)!=NIL)
|
847 |
| -elog(ERROR,"SET takes only one argument for this parameter"); |
| 852 | +elog(ERROR,"SET %s takes only one argument",name); |
| 853 | + |
848 | 854 | n= (A_Const*)lfirst(args);
|
849 | 855 | /* If this is a T_Integer, then we should convert back to a string
|
850 | 856 | * but for now we just reject the parameter.
|
|