X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 72D2B3A5996 for ; Thu, 13 Jan 2005 16:53:53 +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 68051-05 for ; Thu, 13 Jan 2005 16:53:47 +0000 (GMT) Received: from komserv.mpipsykl.mpg.de (angua.mpipsykl.mpg.de [145.253.118.66]) by svr1.postgresql.org (Postfix) with ESMTP id 47C0E3A5929 for ; Thu, 13 Jan 2005 16:53:45 +0000 (GMT) Received: from komserv.mpipsykl.mpg.de ([172.17.7.1] helo=komserv) by komserv.mpipsykl.mpg.de with esmtp (Exim 4.43) id 1Cp8E9-0003fX-Kn for pgsql-interfaces@postgresql.org; Thu, 13 Jan 2005 17:53:41 +0100 Received: from pcf91.mpipsykl.mpg.de ([172.17.6.91]) by komserv.mpipsykl.mpg.de (MailMonitor for SMTP v1.2.2 ) ; Thu, 13 Jan 2005 17:53:41 +0100 (CET) Message-ID: <41E6A794.6020701@mpipsykl.mpg.de> Date: Thu, 13 Jan 2005 17:53:40 +0100 From: =?ISO-8859-1?Q?Benno_P=FCtz?= Reply-To: puetz@mpipsykl.mpg.de User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: How to detect NULL in VarChar (C function) X-Enigmail-Version: 0.84.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Archive-Number: 200501/3 X-Sequence-Number: 5229 I try to write a function that combines two varchar columns. Now the problem arose that (either) one of te columns may contain a NULL value, in which case the return value seems to become NULL. I have not been able to find a description of how to detect NULL values in VarChar variables passed to C-functions to catch those cases. Any help will be appreciated Benno