X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 56B12D7679 for ; Thu, 25 Aug 2005 17:44:56 -0300 (ADT) 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 88234-06 for ; Thu, 25 Aug 2005 20:44:52 +0000 (GMT) Received: from web35202.mail.mud.yahoo.com (web35202.mail.mud.yahoo.com [66.163.179.81]) by svr1.postgresql.org (Postfix) with SMTP id 16D9DD7389 for ; Thu, 25 Aug 2005 17:44:51 -0300 (ADT) Received: (qmail 89785 invoked by uid 60001); 25 Aug 2005 20:44:53 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=J0POJ8AObdarVTf5yRBnmrpXV1qy6Jrf3B8pGo24ySQi8ShYJVn4b9wpzQSfoIRobUCRyyvXJ/+GwEL2Pi2vOz5vdHLZ/b42WrkHSqHSW9Z8h7QkQ9P454PorNbxIvdf5y8I+ZnKEEvjoq/XsG6uFshdEoOWdg8+YKNXYvbSFVI= ; Message-ID: <20050825204453.89783.qmail@web35202.mail.mud.yahoo.com> Received: from [70.104.144.58] by web35202.mail.mud.yahoo.com via HTTP; Thu, 25 Aug 2005 13:44:52 PDT Date: Thu, 25 Aug 2005 13:44:52 -0700 (PDT) From: "Matt A." Subject: help To: pgsql-general@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.374 required=5 tests=[AWL=-0.000, DNS_FROM_RFC_ABUSE=0.374] X-Spam-Level: X-Archive-Number: 200508/1296 X-Sequence-Number: 82704 We used nullif('$value','') on inserts in mssql. We moved to postgres but the nullif() function doesn't match empty strings to each other to return null. MS SQL2000 nullif('1','') would insert 1 as integer even though wrapped in '' (aka string). Also nullif('','') would evaluate NULL (both equal returns NULL) and insert the "not a value" accordingly, not return text 'NULL' instead of return NULL if '' == ''. Postgresql will through an error since the defined return type is text. I would like to alter this function all together. How could I find it to manipulate it? We cannot always enter a value for a integer, text, boolean, etc column. Is there any other way to accomplish this in any language? C? Python? PL/x? If so can you suggest where we could learn how to do this or provide an example? Please help. Domo Matthew ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs