triggers problems whit function

From: Ma(dot) Cristina Peña C(dot) <mpena(at)sensacd(dot)com(dot)mx>
To: <pgsql-general(at)postgresql(dot)org>
Subject: triggers problems whit function
Date: 2008-10-22 20:01:10
Message-ID: 252EE06031407243B058CF7699226E3A5E458F@mail2.sensacd.com.mx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I want to use a function in to a trigger

This is my

CREATE FUNCTION "subradio"(integer) RETURNS integer AS 'select cast(count (claveubica) as integer ) from asradios where ubicacion =0;' LANGUAGE 'sql';

And my ttrigger is

CREATE TRIGGER validaradios AFTER DELETE ON subestacion FOR EACH ROW EXECUTE PROCEDURE subradio(0);

But I got an error

ERROR: CreateTrigger: function subradio() does not exist

What can I do??

Ing. María Cristina Peña C.

Analista Programador

Sensa Control Digital S.A. de C.V.

Dir. Av. Bravo #93 Ote.

Col. Centro.
Torreón Coah.

Tel. Directo: (871) 747 01 04

Conmutador: (871) 747 01 01

Tel. Fax: (871) 747 01 90

Correo Electrónico: mpena(at)sensacd(dot)com(dot)mx <mailto:rlopezr(at)sensacd(dot)com(dot)mx>

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alexander Kuprijanov 2008-10-22 20:05:01 how to split coordinates from point
Previous Message Craig Ringer 2008-10-22 17:48:23 Re: How to get schema name which violates fk constraint