Re: Musings on Triggers

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Musings on Triggers
Date: 2005-12-06 16:36:45
Message-ID: 20051206163645.GB1661@webserv.wug-glas.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

am 06.12.2005, um 10:49:31 -0500 mailte Joshua Kramer folgendes:
>
> Greetings all,
>
> Can anyone recommend a tutorial on writing triggers, aside from what's in
> the documentation?
>
> Can a trigger in a table in Database_A alter/insert data in a table in
> Database_B?

No, you can't. (except with dblink)

>
> Can I write a trigger such that, it runs on every insert into Table_A, and
> inserts a subset of fields of this insert into Table_B, but if this is not
> successful, then the insert on Table_A also fails?

Yes.

HTH, Andreas
--
Andreas Kretschmer (Kontakt: siehe Header)
Heynitz: 035242/47212, D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
=== Schollglas Unternehmensgruppe ===

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Walter 2005-12-06 17:01:02 CSV file - Using COPY Command - Double-Quotes
Previous Message Joshua Kramer 2005-12-06 15:49:31 Musings on Triggers