From: nathan <nathan@penguincomputing.com>
To: pgsql-sql@postgreSQL.org <pgsql-sql@postgreSQL.org>
Subject: Select statements on a table that has null fields
Date: Fri, 17 Sep 1999 13:07:43 -0700
Message-ID: <37E29F8F.4162E6EF@penguincomputing.com> (raw)
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 fields will 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
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: nathan@penguincomputing.com
Subject: Re: Select statements on a table that has null fields
In-Reply-To: <37E29F8F.4162E6EF@penguincomputing.com>
References: <37E29F8F.4162E6EF@penguincomputing.com>
* 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