X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 8AB2ED1C48E for ; Wed, 6 Aug 2003 13:58:39 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 32260-09 for ; Wed, 6 Aug 2003 10:57:21 -0300 (ADT) Received: from mailhub.mail.Virginia.EDU (mail.Virginia.EDU [128.143.2.9]) by svr1.postgresql.org (Postfix) with ESMTP id 97A1FD1C4C1 for ; Wed, 6 Aug 2003 10:58:28 -0300 (ADT) Received: from smtp.mail.Virginia.EDU (smtp.mail.Virginia.EDU [128.143.22.52]) by mailhub.mail.Virginia.EDU (Postfix) with ESMTP id 211B432208 for ; Wed, 6 Aug 2003 09:58:33 -0400 (EDT) Received: from virginia.edu (d-128-19-222.bootp.Virginia.EDU [128.143.19.222]) by smtp.mail.Virginia.EDU (8.11.7/8.11.6) with ESMTP id h76Dw3l43022 for ; Wed, 6 Aug 2003 09:58:03 -0400 Message-ID: <3F310BA1.2010701@virginia.edu> Date: Wed, 06 Aug 2003 10:07:29 -0400 From: Jodi Kanter User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1 X-Accept-Language: en-us MIME-Version: 1.0 To: Postgres SQL List Subject: looking for empty fields Content-Type: multipart/alternative; boundary="------------010203070402040603030707" X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/48 X-Sequence-Number: 14664 --------------010203070402040603030707 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit We recently upgraded from version 7.2.3 to 7.3.3 and seem to have some code that has broken. We were doing checks in various locations looking for nulls and/or empty fields. To search for empty fields we said something like select count(am_pk) from arraymeasurement where al_fk is null or al_fk=''; Is this not allowed anymore? All my check with the double ticks are failing. I assume there is a difference in postgres between an empty and null field. How can I check for both in 7.3.3? Thanks Jodi -- _______________________________ Jodi L Kanter BioInformatics Database Administrator University of Virginia (434) 924-2846 jkanter@virginia.edu --------------010203070402040603030707 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit We recently upgraded from version 7.2.3 to 7.3.3 and seem to have some code that has broken. We were doing checks in various locations looking for nulls and/or empty fields. To search for empty fields we said something like

select count(am_pk) from arraymeasurement where al_fk is null or al_fk='';

Is this not allowed anymore? All my check with the double ticks are failing. I assume there is a difference in postgres between an empty and null field. How can I check for both in 7.3.3?
Thanks
Jodi
--
________________________________

_______________________________
Jodi L Kanter
BioInformatics Database Administrator
University of Virginia
(434) 924-2846
jkanter@virginia.edu


 

 

 

--------------010203070402040603030707--