Received: from smtp.well.com (smtp.well.com [206.80.6.147]) by hub.org (8.8.8/8.8.8) with ESMTP id NAA01565 for ; Wed, 23 Sep 1998 13:41:56 -0400 (EDT) (envelope-from nharkins@well.com) Received: from well.com (nharkins@well.com [206.15.64.10]) by smtp.well.com (8.8.6/8.8.4) with SMTP id KAA05896 for ; Wed, 23 Sep 1998 10:41:46 -0700 (PDT) Date: Wed, 23 Sep 1998 10:41:43 -0700 (PDT) From: Neil Harkins Reply-To: Neil Harkins To: pgsql-sql@postgreSQL.org Subject: '' != NULL in PostGres??? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Hello. I am experimenting with Postgresql-6.3.2 on a RedHat 5.1 DEC Alpha: nuacct=> create table users ( nuacct-> recno int, nuacct-> custid int unique, nuacct-> username char(14) not null, nuacct-> service int nuacct-> ); NOTICE: CREATE TABLE/UNIQUE will create implicit index users_custid_key for table users CREATE nuacct=> insert into users values nuacct-> ( 0, 0, '', 0 ); INSERT 18241 1 ??? Shouldn't that have failed, generating an error ??? nuacct=> select * from users where username is null; recno|custid|username|service -----+------+--------+------- (0 rows) nuacct=> select * from users where username = ''; recno|custid| username|service -----+------+--------------+------- 0| 0| | 0 (1 row) nuacct=> \d users Table = users +----------------------------------+------------------------------+------+ | Field | Type |Length| +----------------------------------+------------------------------+------+ | recno | int4 |4 | | custid | int4 |4 | | username | char() not null |14 | | service | int4 |4 | +----------------------------------+------------------------------+------+ ???