views & triggers

Started by Lieven Van Ackerover 25 years ago4 messagesgeneral
Jump to latest
#1Martín Marqués
martin@bugs.unl.edu.ar
In reply to: Lieven Van Acker (#2)
Re: views & triggers

On Lun 07 May 2001 15:58, Lieven Van Acker wrote:

Hi,

does Postgresql 7.1 support triggers on a view actions? I've defined a few
but they doesn't seem to get fired. Problem is I cannot easily set the
trigger on the tables because of permission issues...

Did you try with rules? Remember that you can not insert, update or delete
through a view. Only visualize de information.

Saludos... :-)

--
El mejor sistema operativo es aquel que te da de comer.
Cuida tu dieta.
-----------------------------------------------------------------
Martin Marques | mmarques@unl.edu.ar
Programador, Administrador | Centro de Telematica
Universidad Nacional
del Litoral
-----------------------------------------------------------------

#2Lieven Van Acker
lieven@elisa.be

Hi,

does Postgresql 7.1 support triggers on a view actions? I've defined a few but they doesn't seem to get fired. Problem is I cannot easily set the trigger on the tables because of permission issues...

Lieven

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Lieven Van Acker (#2)
Re: views & triggers

Lieven Van Acker <lieven@elisa.be> writes:

does Postgresql 7.1 support triggers on a view actions?

No, triggers apply to actual tuple insertions/updates/deletions,
and a view never has any of those. You'd need to set the triggers
on the underlying real tables, instead.

Problem is I cannot easily set the trigger on the tables because of
permission issues...

I think the long-term plan is for trigger functions to execute setuid
to the table owner. Will that help?

regards, tom lane

#4Lieven Van Acker
lieven@elisa.be
In reply to: Lieven Van Acker (#2)
Re: views & triggers

Tom Lane wrote:

Lieven Van Acker <lieven@elisa.be> writes:

does Postgresql 7.1 support triggers on a view actions?

No, triggers apply to actual tuple insertions/updates/deletions,
and a view never has any of those. You'd need to set the triggers
on the underlying real tables, instead.

Problem is I cannot easily set the trigger on the tables because of
permission issues...

I think the long-term plan is for trigger functions to execute setuid
to the table owner. Will that help?

This should do for my current requirements.

Lieven