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

From: jwieck(at)debis(dot)com (Jan Wieck)
To: vadim(at)sable(dot)krasnoyarsk(dot)su (Vadim B(dot) Mikheev)
Cc: jwieck(at)debis(dot)com, brett(at)work(dot)chicken(dot)org, pgsql-hackers(at)hub(dot)org, scrappy(at)hub(dot)org, wieck(at)sapserv(dot)debis(dot)de
Subject: Re: [HACKERS] rule system, perl and other good stuff
Date: 1998-02-11 09:41:27
Message-ID: m0y2YfX-000BFRC@orion.SAPserv.Hamburg.dsh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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(at)debis(dot)com (Jan Wieck) #

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Yu HyungSic 1998-02-11 11:09:50 (no subject)
Previous Message Brett McCormick 1998-02-11 09:38:08 Re: [HACKERS] rule system, perl and other good stuff