How to setup a column constraint for an integer type? Default 0 if not defined - Mailing list pgsql-general

From Wang, Mary Y
Subject How to setup a column constraint for an integer type? Default 0 if not defined
Date
Msg-id FA20D4C4FEBFD148B1C0CB09913825FC0457D933D9@XCH-SW-06V.sw.nos.boeing.com
Whole thread Raw
Responses Re: How to setup a column constraint for an integer type? Default 0 if not defined  (John R Pierce <pierce@hogranch.com>)
List pgsql-general
Hi,


I'm trying to port some source code to Postgres 8.3.8 and have been encountering some surprises :-(
I would like to set up a column constraint for an integer type, so that when the value is undefined, it would assign a
defaultvalue of 0 to that column. 
How would I do that in 8.3.8?  Please provide an example.

Mary






pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: [GENERAL] Postgres 9.1 - Release Theme
Next
From: John R Pierce
Date:
Subject: Re: How to setup a column constraint for an integer type? Default 0 if not defined