Re: Triggers and Function's - Mailing list pgsql-general

From Alam Surya
Subject Re: Triggers and Function's
Date
Msg-id 012801c3259e$e54e4bc0$9b00a8c0@alam
Whole thread Raw
In response to Triggers and Function's  (Campos Chaves <camposchaves@yahoo.com.br>)
List pgsql-general
just example :

Create or replace function [function_name()] returns triggers as'
begin
insert into table_b ( field1, field2, field3 )  values ( value1 , values2,
value3 ) ;
return;
end ;'
languange 'plpgsql';

Create trigger trigger_name
      After Insert on [table_name]
      for each row
      execute procedure [function_name()];

regard...

Alam Surya

----- Original Message -----
From: "Campos Chaves" <camposchaves@yahoo.com.br>
To: <pgsql-general@postgresql.org>
Sent: Thursday, May 29, 2003 3:51 AM
Subject: [GENERAL] Triggers and Function's


Hi,

After I insert on rocord on Table A, I need to insert
another record on Table B. I think that I have to use
triggers and functions. But I don't know how! You can
help me?

Tanks

_______________________________________________________________________
Yahoo! Mail
Mais espaço, mais segurança e gratuito: caixa postal de 6MB, antivírus,
proteção contra spam.
http://br.mail.yahoo.com/

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)


pgsql-general by date:

Previous
From: "Alam Surya"
Date:
Subject: Re: Can anybody recommend an IDE for writing SQL/PLPSQL
Next
From: Joe Conway
Date:
Subject: Re: arrays and insert/select