[NOVICE] "NOT NULL" field

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[NOVICE] "NOT NULL" field

tövis
Hi everybody!
I'm using PostgreSQL 7.4.7 on Debian Testing (Kernel 2.4.27 SMP) with winXP application (Clarion 6.1 RAD) through ODBC Unicode 3.0(?) Beta.
Currently I'm converting my existing database and realize that "NOT NULL" seem to be is not enough! - server accepting NULL value?
This is the fragment of the definition. What is wrong?
 
CREATE TABLE nod
(
 aid     serial CONSTRAINT nod_key PRIMARY KEY NOT NULL,
 num     INTEGER NOT NULL,
....
);
 
Tovis
 
Reply | Threaded
Open this post in threaded view
|

Re: [NOVICE] "NOT NULL" field

Jaime Casanova
On 5/23/05, tövis <[hidden email]> wrote:

>  
> Hi everybody!
> I'm using PostgreSQL 7.4.7 on Debian Testing (Kernel 2.4.27 SMP) with winXP
> application (Clarion 6.1 RAD) through ODBC Unicode 3.0(?) Beta.
> Currently I'm converting my existing database and realize that "NOT NULL"
> seem to be is not enough! - server accepting NULL value?
> This is the fragment of the definition. What is wrong?
>  
> CREATE TABLE nod
> (
>  aid     serial CONSTRAINT nod_key PRIMARY KEY NOT NULL,
>  num     INTEGER NOT NULL,
> ....
> );
>  
> Tovis
>  
Verify you aren't saving blank spaces, that is not the same that not
null. Until, when i have constrained a field to be not null it
rejected to save nulls.

a little test, do a copy from table to file, and see the contents if
you have \N characters you are right these are nulls if not they are
not.

--
Atentamente,
Jaime Casanova
(DBA: DataBase Aniquilator ;)

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match
Reply | Threaded
Open this post in threaded view
|

Re: [NOVICE] "NOT NULL" field

tövis
Hi!
pgAdmin III gives me result "0" in a csv file.
Nativ pg_dump also give me beck "0"? What is going on?;o(

----- Original Message -----
From: "Jaime Casanova" <[hidden email]>
To: "tövis" <[hidden email]>
Cc: "pgsql novice" <[hidden email]>
Sent: Monday, May 23, 2005 11:16 PM
Subject: Re: [NOVICE] "NOT NULL" field


On 5/23/05, tövis <[hidden email]> wrote:

>
> Hi everybody!
> I'm using PostgreSQL 7.4.7 on Debian Testing (Kernel 2.4.27 SMP) with
> winXP
> application (Clarion 6.1 RAD) through ODBC Unicode 3.0(?) Beta.
> Currently I'm converting my existing database and realize that "NOT NULL"
> seem to be is not enough! - server accepting NULL value?
> This is the fragment of the definition. What is wrong?
>
> CREATE TABLE nod
> (
>  aid     serial CONSTRAINT nod_key PRIMARY KEY NOT NULL,
>  num     INTEGER NOT NULL,
> ....
> );
>
> Tovis
>
Verify you aren't saving blank spaces, that is not the same that not
null. Until, when i have constrained a field to be not null it
rejected to save nulls.

a little test, do a copy from table to file, and see the contents if
you have \N characters you are right these are nulls if not they are
not.

--
Atentamente,
Jaime Casanova
(DBA: DataBase Aniquilator ;)


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org
Reply | Threaded
Open this post in threaded view
|

Re: [NOVICE] "NOT NULL" field

Jaime Casanova
On 5/23/05, tövis <[hidden email]> wrote:
> Hi!
> pgAdmin III gives me result "0" in a csv file.
> Nativ pg_dump also give me beck "0"? What is going on?;o(
>
AFAIK, pg_dump without any parameters give you \N for NULL fields

--
Atentamente,
Jaime Casanova
(DBA: DataBase Aniquilator ;)

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org