Thread: CREATE USER in RULE or TRIGGER

CREATE USER in RULE or TRIGGER

From
Marcin Mazurek
Date:
HI,
is it possible to CREATE USER in a RILE or TRIGGER? I haven't succeded so
far, although the TRIGGER and RULE is damn simple.
I thought it some limitation I'm not aware of.
If it is what's the other way to do it with trigger function. C function
with SPI?

tia
mazek


Marcin Mazurek

--
Kierownik Działu Systemowego
MULTINET SA o/Poznan
http://www.multinet.pl/

Re: CREATE USER in RULE or TRIGGER

From
Tom Lane
Date:
Marcin Mazurek <M.Mazurek@poznan.multinet.pl> writes:
> is it possible to CREATE USER in a RILE or TRIGGER?

Not with a rule, and not with a plpgsql trigger either (although I think
the latter restriction is fixed in current sources).  You could make it
work with a pltcl trigger, I believe.

            regards, tom lane