Re: plpgsql allowing null fields in insert commands?

From: John DeSoi <desoi(at)pgedit(dot)com>
To: "Celia McInnis" <celia(at)drmath(dot)ca>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: plpgsql allowing null fields in insert commands?
Date: 2005-03-16 13:08:18
Message-ID: 76E73F22-961C-11D9-8BAD-000A95B03262@pgedit.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Stephan Szabo 2005-03-16 14:07:59 Re: plpgsql allowing null fields in insert commands?
Previous Message Sean Davis 2005-03-16 11:18:29 Re: fetching text file from internet