1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

In HEAD only, revert kluge solution for preventing misuse of pg_get_expr().

A data-type-based solution, which is much cleaner and more bulletproof,
will follow shortly.  It seemed best to make this a separate commit though.
This commit is contained in:
Tom Lane
2010-09-03 01:26:52 +00:00
parent c89a1198f9
commit 8ab6a6b456
4 changed files with 4 additions and 134 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/tcop/fastpath.c,v 1.105 2010/07/06 19:18:57 momjian Exp $
* $PostgreSQL: pgsql/src/backend/tcop/fastpath.c,v 1.106 2010/09/03 01:26:52 tgl Exp $
*
* NOTES
* This cruft is the server side of PQfn.
@ -29,7 +29,6 @@
#include "tcop/fastpath.h"
#include "tcop/tcopprot.h"
#include "utils/acl.h"
#include "utils/fmgroids.h"
#include "utils/lsyscache.h"
#include "utils/snapmgr.h"
#include "utils/syscache.h"
@ -348,16 +347,6 @@ HandleFunctionRequest(StringInfo msgBuf)
aclcheck_error(aclresult, ACL_KIND_PROC,
get_func_name(fid));
/*
* Restrict access to pg_get_expr(). This reflects the hack in
* transformFuncCall() in parse_expr.c, see comments there for an
* explanation.
*/
if ((fid == F_PG_GET_EXPR || fid == F_PG_GET_EXPR_EXT) && !superuser())
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
errmsg("argument to pg_get_expr() must come from system catalogs")));
/*
* Prepare function call info block and insert arguments.
*/