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

Re: Indicators

From: Atif Jung <atifjung(at)gmail(dot)com>
To: Francisco Leovey <fleovey(at)yahoo(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: Indicators
Date: 2010-04-29 10:26:33
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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?


On 27 April 2010 12:52, Francisco Leovey <fleovey(at)yahoo(dot)com> wrote:

>   Yes if done from C - use Perl instead, much better
> --- On *Tue, 4/27/10, Atif Jung <atifjung(at)gmail(dot)com>* wrote:
> From: Atif Jung <atifjung(at)gmail(dot)com>
> Subject: [NOVICE] Indicators
> To: pgsql-novice(at)postgresql(dot)org
> Date: Tuesday, April 27, 2010, 8:05 AM
>  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
> 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

In response to

  • Indicators at 2010-04-27 11:05:29 from Atif Jung

pgsql-novice by date

Next:From: bijoyDate: 2010-04-29 10:28:37
Subject: pls help me to unsubscribe from this list.
Previous:From: Jasen BettsDate: 2010-04-29 09:21:11
Subject: Re: Indicators

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