Indicators

From: Atif Jung <atifjung(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Indicators
Date: 2010-04-27 11:05:29
Message-ID: u2kd1c6b9c51004270405n9358def3wa671566bb71048ec@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Am I correct in understanding that when doing a select on a table I cannot
retrieve a NULL value from the database directly into the variable I'm
selecting into, but I must use an indicator. So for example

EXEC SQL SELECT b INTO :val FROM test1;

will fail if b is NULL, so I must use

EXEC SQL SELECT b INTO :val :val_ind FROM test1;

and then check the value of val_ind. If 0 then val is not NULL is -ve then
it is NULL?

Thanks

Atif

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Alan Simon 2010-04-27 15:51:44 Program Syntax Help Needed
Previous Message Devrim GÜNDÜZ 2010-04-26 18:38:16 Re: install both i386 and x86_64 libs