Re: [HACKERS] rule system, perl and other good stuff

Jan Wieck <jwieck@debis.com>

From: jwieck@debis.com (Jan Wieck)
To: vadim@sable.krasnoyarsk.su (Vadim B. Mikheev)
Cc: jwieck@debis.com, brett@work.chicken.org, pgsql-hackers@hub.org, scrappy@hub.org, wieck@sapserv.debis.de
Date: 1998-02-11T09:41:27Z
Lists: pgsql-hackers
BTW,

    recently  I  hacked  around on the SETUID stuff and it wasn't
    that much to do.

    I renamed the obsolete and unsupported proistrusted attribute
    in pg_proc to proissetuid and made it default to false.  Then
    I   hacked   some   code    into    ExecMakeFunctionResult(),
    ExecCallTriggerFunc()  and  utils/init/miscinit.c and voila -
    setting proissetuid to true works for 'sql', 'C', and any  PL
    functions called via a func node by the executor or triggerd.
    It does not work for input/output  functions  and  I  haven't
    checked  about  operators  and aggregates. I don't think that
    types  input/output   functions   need   it   and   for   the
    operators/aggregates it must be that easy too.

    What should the syntax for setting/unsetting proissetuid?

        ALTER FUNCTION funcname (args) (NO)SETUID

    looks good for me.

    But before doing anything here I think we should also be able
    to make a view setuid. I haven't thought much about  that  up
    to now.  Any ideas how and where this could be done?


Until later, Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#======================================== jwieck@debis.com (Jan Wieck) #