Skip site navigation (1) Skip section navigation (2)

Not Null Field

From: Margarita Barvinok <brita(at)umich(dot)edu>
To: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Not Null Field
Date: 1999-09-20 15:34:42
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces

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

Thank you,

Margarita Barvinok
System Administrator II
University of Michigan
Department of Biology


pgsql-interfaces by date

Next:From: Michael MeskesDate: 1999-09-20 16:46:00
Subject: Re: [INTERFACES] Not Null Field
Previous:From: eem21Date: 1999-09-20 15:33:52
Subject: libpq - changes for async connections - Windows tester required

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group