pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: fabio <penguin@email.it>
To: pgsql-sql@postgresql.org
Subject: Re: Executing SQL commands via triggers without the use of procedures
Date: Thu, 27 Mar 2003 00:04:48 +0100
Message-ID: <pan.2003.03.26.23.04.45.243238@email.it> (raw)
References: <001501c2def2$fe2fe9c0$1f84fea9@oemcomputer>


> 
> Having scoured the relevant documentation I cannot find anything which indi=
> cates how I simply create a database trigger to insert into a second table =
> after insert on a first table, without the use of a procedure.  As I do not=
>  want return values etc. this seems like overkill.  Is it possible to creat=
> e a trigger which executes SQL directly without the need to create a proced=
> ure?  If so, what is the syntax?
> 

hello! I had the same problem, is possible to solve it with a rules but
depend. In my db i used a trigger because,i have multiple insert in
cascade and the rules dont handle this 

manual for trigger procedure:
http://www.postgresql.org/docs/view.php?version=7.3&idoc=1&file=plpgsql-trigger.html

trigger vs rules
http://www.postgresql.org/docs/view.php?version=7.3&idoc=1&file=rules-triggers.html

fabio




view thread (5+ messages)

Message-ID: <pan.2003.03.26.23.04.45.243238@email.it>
Permalink:  ../pan.2003.03.26.23.04.45.243238@email.it/
Also on:    postgresql.org/message-id/pan.2003.03.26.23.04.45.243238@email.it

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: penguin@email.it
  Subject: Re: Executing SQL commands via triggers without the use of procedures
  In-Reply-To: <pan.2003.03.26.23.04.45.243238@email.it>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox