~ubuntu-branches/ubuntu/hardy/postgresql-8.4/hardy-backports

« back to all changes in this revision

Viewing changes to src/backend/tcop/fastpath.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-01-03 08:57:10 UTC
  • mfrom: (5.3.10 sid)
  • Revision ID: james.westby@ubuntu.com-20110103085710-v9u121v7u7oq8qca
Tags: 8.4.6-1~hardy1
Automated backport upload; no source changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 *
9
9
 *
10
10
 * IDENTIFICATION
11
 
 *        $PostgreSQL: pgsql/src/backend/tcop/fastpath.c,v 1.101 2009/01/01 17:23:48 momjian Exp $
 
11
 *        $PostgreSQL: pgsql/src/backend/tcop/fastpath.c,v 1.101.2.1 2010/06/30 18:10:37 heikki Exp $
12
12
 *
13
13
 * NOTES
14
14
 *        This cruft is the server side of PQfn.
29
29
#include "tcop/fastpath.h"
30
30
#include "tcop/tcopprot.h"
31
31
#include "utils/acl.h"
 
32
#include "utils/fmgroids.h"
32
33
#include "utils/lsyscache.h"
33
34
#include "utils/snapmgr.h"
34
35
#include "utils/syscache.h"
350
351
                                           get_func_name(fid));
351
352
 
352
353
        /*
 
354
         * Restrict access to pg_get_expr(). This reflects the hack in
 
355
         * transformFuncCall() in parse_expr.c, see comments there for an
 
356
         * explanation.
 
357
         */
 
358
        if ((fid == F_PG_GET_EXPR || fid == F_PG_GET_EXPR_EXT) && !superuser())
 
359
                ereport(ERROR,
 
360
                                (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
 
361
                                 errmsg("argument to pg_get_expr() must come from system catalogs")));
 
362
 
 
363
        /*
353
364
         * Prepare function call info block and insert arguments.
354
365
         */
355
366
        InitFunctionCallInfoData(fcinfo, &fip->flinfo, 0, NULL, NULL);