Re: Indicators

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Indicators
Date: 2010-04-29 09:21:11
Message-ID: hrbj27$tt4$3@reversiblemaps.ath.cx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On 2010-04-27, Atif Jung <atifjung(at)gmail(dot)com> wrote:
> --0016e6d58ae54607be048535e007
> Content-Type: text/plain; charset=ISO-8859-1
>
> 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

what language is that?

In response to

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

Browse pgsql-novice by date

  From Date Subject
Next Message Atif Jung 2010-04-29 10:26:33 Re: Indicators
Previous Message Jasen Betts 2010-04-29 09:18:58 Re: how to continue after error in batch mode with psql