Need help with simple update / insert trigger

From: Matthew Wilson <matt(at)tplus1(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Need help with simple update / insert trigger
Date: 2008-08-28 15:15:06
Message-ID: slrngbdg7q.iki.matt@sprout.tplus1.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have table sort of like this:

create table snoz (
a bool default false,
b bool default false,
c bool default false
);

I want to set up a trigger so that any time a row is inserted or
updated, the value of c is set to true if a and/or b is true.

How can I do this?

Thanks!

Matt

Browse pgsql-general by date

  From Date Subject
Next Message Douglas McNaught 2008-08-28 15:21:24 Re: WAL file questions - how to relocate on Windows, how to replay after total loss, etc
Previous Message Devrim GÜNDÜZ 2008-08-28 15:10:54 Re: upgrading from 8.1.4 to 8.3.3