X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 743638B9D3B for ; Tue, 22 Feb 2005 21:10:30 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 13129-04 for ; Tue, 22 Feb 2005 21:10:25 +0000 (GMT) Received: from mail1.elevating.com (wsip-68-99-77-237.tu.ok.cox.net [68.99.77.237]) by svr1.postgresql.org (Postfix) with ESMTP id 1F4888B9D46 for ; Tue, 22 Feb 2005 21:10:24 +0000 (GMT) Received: from bretsony.brets.elevating.com (bretsony.brets.elevating.com [10.23.0.139]) by mail1.elevating.com (8.11.6/8.11.6) with ESMTP id j1ML9sK19204 for ; Tue, 22 Feb 2005 15:09:54 -0600 Subject: how can I query for unset timestamps From: Bret Hughes To: postgresql sql list Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 (1.0.8-9.7x.1) Date: 22 Feb 2005 15:09:54 -0600 Message-Id: <1109106594.3945.120.camel@bretsony> Mime-Version: 1.0 X-Elevating-MailScanner: Found to be clean X-Elevating-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.5, required 5, BAYES_00 -1.50) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200502/253 X-Sequence-Number: 20364 I have a table that I recently altered by adding several timestamp columns. I would like to query the table for those rows for which the timestamp has not been set but am unable to find a way to do so. any tips ? in psql the column appears empty and char_length returns nothing. Some of what I have tried "" -> not valid char_length(last_timestamp) > 0 -> returns the rows with the time stamps where NOT char_length(last_timestamp) > 0 -> returns 0 rows where NOT (char_length(last_timestamp) > 0 ) -> returns 0 rows where last_timestamp = NULL; -> 0 rows this is kicking my butt, and starting to piss me off so if any one has tips I would appreciate it. Bret