Select statements on a table that has null fields - Mailing list pgsql-sql

From nathan
Subject Select statements on a table that has null fields
Date
Msg-id 37E29F8F.4162E6EF@penguincomputing.com
Whole thread Raw
List pgsql-sql
Question : Postgres 6.5.1 Linux Redhat 6.0

I have a table that has 6 columns, 3 of the columns have data in every
field but the last 3 columns have some data and some null fields. When I
do a select statement and query on the columns that have a null field I
crash the connection. Is this normal or is this a bug or am I doing
something wrong ?

Example:

create table sales_info (
   product_id int8   product_desc char(20),   in_stock int8,   //some fields will be null   on_shelf int8,   //some
fieldswill be null   total_sold int8   item_cost float8   )
 

select * from sales_info where in_stock >  3;

This will crash if the in_stock column has some rows with null values.


Nathan



pgsql-sql by date:

Previous
From: "Stephen Horton"
Date:
Subject: Re: pgsql-sql-digest V1 #355 - unsubscribe please
Next
From: "Zot O'Connor"
Date:
Subject: Converting an existing table?