i had written a stored procedure that works as trigger for upate and
delete statements.
The trigger raises an error if there is a not allowd change on the row,
that's the normal way.
But now I have a special stored procedure with must be update the value
but the trigger needn't be
called. Can I suppress on Postgres 8.3.5 for exactly one statement the
trigger function?
I need something like this "update table set field='not allowd values'
where ... without run-update-trigger"
I wouldn't use the disable / enable trigger work around, because it
should be only in the user-session, that
is currenty in use.
Thats for help
Phil
You can't circumvent the trigger like that. As for doing things like that
in multiuser environment, my advice is to allocate a maintenance time and
do things like that while the database is inaccessible to the users.
I would create a special NOLOGIN database role for that purpose,
and make that role the owner of the function that has to do
the "illegal" modifications.
The role should only have the permissions necessary to
do the job.
The function is created with with "SECURITY DEFINER".
Then I would modify the trigger function so that it
does nothing if the current user is that special user.
Yours,
Laurenz Albe