|
7 | 7 | * |
8 | 8 | * |
9 | 9 | * IDENTIFICATION |
10 | | - * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.42 1997/09/08 21:46:00 momjian Exp $ |
| 10 | + * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.43 1997/09/18 14:32:15 vadim Exp $ |
11 | 11 | * |
12 | 12 | *------------------------------------------------------------------------- |
13 | 13 | */ |
@@ -2467,13 +2467,18 @@ ParseFunc(ParseState *pstate, char *funcname, List *fargs, int *curr_resno) |
2467 | 2467 | { |
2468 | 2468 | Const*seq; |
2469 | 2469 | char*seqrel; |
| 2470 | +text*seqname; |
2470 | 2471 | int32aclcheck_result=-1; |
| 2472 | +externtext*lower (text*string); |
2471 | 2473 |
|
2472 | 2474 | Assert(length(fargs)==1); |
2473 | 2475 | seq= (Const*)lfirst(fargs); |
2474 | 2476 | if (!IsA((Node*)seq,Const)) |
2475 | 2477 | elog(WARN,"%s: only constant sequence names are acceptable",funcname); |
2476 | | -seqrel=textout((structvarlena*) (seq->constvalue)); |
| 2478 | +seqname=lower ((text*)DatumGetPointer(seq->constvalue)); |
| 2479 | +pfree (DatumGetPointer(seq->constvalue)); |
| 2480 | +seq->constvalue=PointerGetDatum (seqname); |
| 2481 | +seqrel=textout(seqname); |
2477 | 2482 |
|
2478 | 2483 | if ((aclcheck_result=pg_aclcheck(seqrel,GetPgUserName(), |
2479 | 2484 | ((funcid==SeqNextValueRegProcedure) ?ACL_WR :ACL_RD))) |
|