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

Re: help using arrays in a function

From: Joe Conway <mail(at)joeconway(dot)com>
To: Jennifer Lee <jlee(at)scri(dot)sari(dot)ac(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: help using arrays in a function
Date: 2004-02-26 21:20:00
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
Jennifer Lee wrote:
>            WHILE a[i] LOOP

This problem has nothing to do with arrays, per se. PL/pgSQL no longer 
assumes it can coerce an integer constant to a boolean. Instead make the 
above line look like this:

              WHILE a[i] IS NOT NULL LOOP

BTW, in 7.4 you could more easily get the same result like this:

regression=# select 82 = any ('{100,92,82}');
(1 row)

regression=# select 82 = any ('{100,92}');
(1 row)




In response to

pgsql-general by date

Next:From: Keith BottnerDate: 2004-02-26 21:22:02
Subject: Re: Postgres clustering?
Previous:From: scott.marloweDate: 2004-02-26 21:10:17
Subject: Re: Postmasters pile up

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