triggers in SQL?

From: Neil Conway <nconway(at)klamath(dot)dyndns(dot)org>
To: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: triggers in SQL?
Date: 2000-09-10 18:36:39
Message-ID: 20000910143639.A6527@klamath.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I want to write a simple trigger in SQL (i.e. use the trigger to execute
a simple function written in SQL). I'm having difficulty - CREATE TRIGGER
complains if the return type of the procedure is not 'OPAQUE', but CREATE
FUNCTION won't allow me to create SQL functions with a return type of
OPAQUE.

Am I going about this the wrong way? I want to update some data
automatically when new rows are inserted into table A. Should I use a
TRIGGER AFTER INSERT on table A, or is there a better way? The data
that needs to be updated is fairly simple (actually, just 1 or 2
UPDATE queries), which is why I would prefer not to have to load PL/SQL
or write the function in C.

Thanks, and sorry for my newbie-ness.

Neil

--
Neil Conway <neilconway(at)home(dot)com>
Get my GnuPG key from: http://klamath.dyndns.org/mykey.asc
Encrypted mail welcomed

Whoever you are -- SGI, SCO, HP, or even Microsoft -- most of the smart people
on the planet work somewhere else.
-- Eric S. Raymond

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jordi Scharp 2000-09-10 19:03:50 PostgreSQL + PHP can't connect
Previous Message lee johnson 2000-09-10 16:28:10 Re: [Fwd: Re: postgres not allowing new database?]