How to loop through multi-dimentional array in PL/PGSQL

From: VENKTESH GUTTEDAR <venkteshguttedar(at)gmail(dot)com>
To: PostgreSQL mailing lists <pgsql-general(at)postgresql(dot)org>
Subject: How to loop through multi-dimentional array in PL/PGSQL
Date: 2016-12-09 06:35:39
Message-ID: CA+iwz4kw-LNgtiLKv0t85TiBZ1SZXrbh3ADiVxPHms+xfQwV=w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

Please help me in accessing multi-dimentional array in postgresql
PL/PGSQL.

for i in array_lower(product_list, 1) .. array_upper(product_list, 1)
LOOP
product_list[i][0];
END LOOP;

Is the above code right?

Or is there any other way to access, i am getting null for
product_list[i][0];

Any help would be appreciated.

--
Regards :
Venktesh Guttedar.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Karsten Hilbert 2016-12-09 07:58:07 Re: Looking for an online mentor
Previous Message Roshan Jha 2016-12-09 04:56:58 Regrding:- Arduino-Postgresql Direct Connection