Re: Indicators
От | Atif Jung |
---|---|
Тема | Re: Indicators |
Дата | |
Msg-id | m2td1c6b9c51004290326s8bd20cfbgce84e6d4d1d5b536@mail.gmail.com обсуждение исходный текст |
Ответ на | Indicators (Atif Jung <atifjung@gmail.com>) |
Список | pgsql-novice |
Unfortunately Perl is not an option. So given:
EXEC SQL SELECT b INTO :val :val_ind FROM test1;
If I where to reference :val immediately after and if b was NULL what would :val contain, assuming that b is an integer, for example, and that val was not initialised to anything when declared?
Atif
On 27 April 2010 12:52, Francisco Leovey <fleovey@yahoo.com> wrote:
Yes if done from C - use Perl instead, much better
--- On Tue, 4/27/10, Atif Jung <atifjung@gmail.com> wrote:
From: Atif Jung <atifjung@gmail.com>
Subject: [NOVICE] Indicators
To: pgsql-novice@postgresql.org
Date: Tuesday, April 27, 2010, 8:05 AMAm 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 exampleEXEC SQL SELECT b INTO :val FROM test1;will fail if b is NULL, so I must useEXEC 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
В списке pgsql-novice по дате отправления: