Re: [HACKERS] rule system, perl and other good stuff - Mailing list pgsql-hackers

From jwieck@debis.com (Jan Wieck)
Subject Re: [HACKERS] rule system, perl and other good stuff
Date
Msg-id m0y2YfX-000BFRC@orion.SAPserv.Hamburg.dsh.de
Whole thread Raw
In response to Re: [HACKERS] rule system, perl and other good stuff  ("Vadim B. Mikheev" <vadim@sable.krasnoyarsk.su>)
List 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) #

pgsql-hackers by date:

Previous
From: Jeroen van Vianen
Date:
Subject: Some cleanups/enhancements
Next
From: Brett McCormick
Date:
Subject: Re: [HACKERS] rule system, perl and other good stuff