Re: plpgsql allowing null fields in insert commands? - Mailing list pgsql-novice

From John DeSoi
Subject Re: plpgsql allowing null fields in insert commands?
Date
Msg-id 76E73F22-961C-11D9-8BAD-000A95B03262@pgedit.com
Whole thread Raw
In response to plpgsql allowing null fields in insert commands?  ("Celia McInnis" <celia@drmath.ca>)
List pgsql-novice
Celia,

On Mar 15, 2005, at 5:53 PM, Celia McInnis wrote:

> In a plpgsql procedure is there any way to form an insert command
> which has
> some null values for values of the inputs?
>
> Currently when I form such a command, the command becomes null if
> there are
> any null values inserted for the fields.

You can insert null values in an insert statement or have row values be
null by not including them in the insert statement. But if you are
getting errors because of this it is likely the column specification of
the table is setup disallow null values.

If this does not answer your question, post an insert example with the
error and the table specification.


John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


pgsql-novice by date:

Previous
From: Sean Davis
Date:
Subject: Re: fetching text file from internet
Next
From: Stephan Szabo
Date:
Subject: Re: plpgsql allowing null fields in insert commands?