trigger-procedure without plpgsql

From: Picrate <picrate(at)ibelgique(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: trigger-procedure without plpgsql
Date: 2002-02-01 13:24:41
Message-ID: 20020201142441.083d78eb.picrate@ibelgique.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,
I!m having a hard time getting out well with trigger-procedures without using plpgsql. I cannot put a hand on some documentation about writing procedures in LANGUAGE 'sql'. There must be some info somewhere, isn't it?
Anyway, if someone can help...
I am trying to make a procedure which can update a table as reaction to an insert into another table. For that, I need to get the id of the table to update but I can't get it in any way because I don't know how to call it. The "new.id_table_to_update" doesn't seem to be recognized (the "new" term into the 'sql' procedure doesn't seem to be the right syntax to reference it).

I would like to use 'sql' language for that 'cause I don't see any interest in doing it with plpgsql if I can do it without it.
If someone could help... or at least mention some place where to learn how to do this, I would be very glad.

Thanks,
Picrate

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mike Mascari 2002-02-01 13:27:39 Re: ORDER BY in \dt+ ?
Previous Message Holger Krug 2002-02-01 12:40:50 Re: non-overlapping ranges constraint?