pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ivo Simicevic <ivo@ultra.hr>
To: Margarita Barvinok <brita@umich.edu>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: [INTERFACES] Not Null Field
Date: Mon, 20 Sep 1999 19:04:48 +0200
Message-ID: <19990920190447.B32064@ultra.hr> (raw)
In-Reply-To: <Pine.SOL.4.10.9909201123400.15989-100000@breakout.rs.itd.umich.edu>
References: <Pine.SOL.4.10.9909201123400.15989-100000@breakout.rs.itd.umich.edu>

On Mon, Sep 20, 1999 at 11:34:42AM -0400, Margarita Barvinok wrote:
> 
> Hi,
> 
> I created the phonebook table with NOT NULL fileds:
> 
> create table phonebook (
> first varchar(20) NOT NULL,
> last varchar(20) NOT NULL,
> uniqname char(8) NOT NULL PRIMARY KEY,
> phone varchar(30),
> status char(7) NOT NULL,
> room varchar(40) );
> 
> If I try to insert NULL values into those fields from psql I got an error
> message - that is right.
> But when I insert records from my C-program (with embedded SQL) I dot no
> errors and such records are added to the table. I even can insert empty
> record. Why this happens? Do I need to write some code to check NULL
> values?
> 
> Thank you,
> -Margarita

How are you doing it? Can you send your source?
I guess you are not entering NULL but empty string values.

Ivo.



view thread (4+ messages)  latest in thread

Message-ID: <19990920190447.B32064@ultra.hr>
Permalink:  ../19990920190447.B32064@ultra.hr/
Also on:    postgresql.org/message-id/19990920190447.B32064@ultra.hr

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: ivo@ultra.hr, brita@umich.edu
  Subject: Re: [INTERFACES] Not Null Field
  In-Reply-To: <19990920190447.B32064@ultra.hr>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox