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

Conditional constraint?

From: Nick Haw <nick(dot)haw(at)operagrp(dot)com>
To: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>,"'pgsql-novice(at)postgresql(dot)org'" <pgsql-novice(at)postgresql(dot)org>,"'pgsql-novice(at)postgresql(dot)org'" <pgsql-novice(at)postgresql(dot)org>,"'pgsql-novice(at)postgresql(dot)org'" <pgsql-novice(at)postgresql(dot)org>
Subject: Conditional constraint?
Date: 2002-03-08 17:06:57
Message-ID: 71F468541618D3118DDF204C4F4F50204B1EC9@ThisAddressDoesNotExist (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-novice
Hi there, I have a problem that I can't fathom out.
 
What I want to do is make a field so that it requires a value after a change
in another field to a particular value. Is this possible with the ADD
CONSTRAINT command, or will I have to make a custom function and use a
trigger.
 
Many thanks
 
Nick 
 

Responses

pgsql-novice by date

Next:From: Robert J. Sanford, Jr.Date: 2002-03-08 18:05:19
Subject: Re: Good tutorial wanted...
Previous:From: Patrick HatcherDate: 2002-03-08 17:01:48
Subject: FATAL 1: Database template0 not accepting connection?

pgsql-general by date

Next:From: Richard EmbersonDate: 2002-03-08 17:14:38
Subject: which JDBC driver
Previous:From: Francisco ReyesDate: 2002-03-08 16:50:30
Subject: Re: Is vacuum full lock like old's vacuum's lock?

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