Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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?



pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group