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 B2AF6D1B51A for ; Thu, 25 Sep 2003 13:14:14 +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 98494-09 for ; Thu, 25 Sep 2003 10:13:47 -0300 (ADT) Received: from wolff.to (wolff.to [66.93.249.74]) by svr1.postgresql.org (Postfix) with SMTP id 48F17D1B4E1 for ; Thu, 25 Sep 2003 10:13:43 -0300 (ADT) Received: (qmail 27521 invoked by uid 500); 25 Sep 2003 13:20:46 -0000 Date: Thu, 25 Sep 2003 08:20:46 -0500 From: Bruno Wolff III To: Roberto Mello Cc: "George A.J" , pgsql-sql@postgresql.org Subject: Re: Case Insensitive comparison Message-ID: <20030925132046.GA27357@wolff.to> Mail-Followup-To: Roberto Mello , "George A.J" , pgsql-sql@postgresql.org References: <20030925033550.35699.qmail@web14915.mail.yahoo.com> <20030925053008.GC4203@cc.usu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030925053008.GC4203@cc.usu.edu> User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/307 X-Sequence-Number: 15285 On Wed, Sep 24, 2003 at 23:30:08 -0600, Roberto Mello wrote: > On Wed, Sep 24, 2003 at 08:35:50PM -0700, George A.J wrote: > > > Another problem is in creating function... > > How can i create a function that accept and return any type. the type "any" is not allowing as parameter or return type. Is it possible? i want to create a function similar to NULLIF(). > > Use the standard coalesce(). coalesce is used to do the inverse of nullif. Postgres also has a nullif function. I suspect that he relly doesn't want to use either of those, but instead wants to have some function that returns the same type as its argument without having to write one function for each different type. There is something along those lines coming in 7.4.