Skip site navigation (1) Skip section navigation (2)

How to detect NULL in VarChar (C function)

From: Benno Pütz <puetz(at)mpipsykl(dot)mpg(dot)de>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: How to detect NULL in VarChar (C function)
Date: 2005-01-13 16:53:40
Message-ID: 41E6A794.6020701@mpipsykl.mpg.de (view raw or flat)
Thread:
Lists: pgsql-interfaces
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


Responses

pgsql-interfaces by date

Next:From: Tom LaneDate: 2005-01-13 19:49:56
Subject: Re: How to detect NULL in VarChar (C function)
Previous:From: Frost, Mr. Michael (contractor)Date: 2005-01-12 16:04:24
Subject: ECPG and CURSOR declaration

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group