Re: Preventing variables from "rolling over"

From: Vivek Khera <khera(at)kcilink(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Preventing variables from "rolling over"
Date: 2001-06-01 15:12:07
Message-ID: x7d78okzeg.fsf@onceler.kciLink.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>>>>> "d" == drevil <drevil(at)sidereal(dot)kz> writes:

d> way to check for this condition before I do the addition? Is there a
d> way to put a constraint on a variable, such that it's always positive?

I have bunches of these:

pid integer CHECK (pid >= 0),

They work great. Your update will return failure so you'll only find
out after the fact, but the table will not have been updated in any
case.

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D. Khera Communications, Inc.
Internet: khera(at)kciLink(dot)com Rockville, MD +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera http://www.khera.org/~vivek/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ken Causey 2001-06-01 15:20:49 Re: PostgreSQL security concerns
Previous Message Peter Eisentraut 2001-06-01 15:07:14 Re: [GENERAL] Compiling to RPM setup/filesystem layout