| From: | Sarit Ritwirune <cs(dot)sarit(at)gmail(dot)com> |
|---|---|
| To: | pgadmin-support(at)postgresql(dot)org |
| Subject: | How to pass same index array value from multiple arrays? |
| Date: | 2015-08-18 14:01:27 |
| Message-ID: | 35889A24-FF54-4325-A081-0C12E3994DB3@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgadmin-support |
Hi
I posted my question on the forum, but seems nobody pay attention that much.
http://dba.stackexchange.com/questions/111410/call-ordered-element-from-foreach-on-multiple-arrays
In PLPGSQL. Can FOREACH loop over the multiple array?. <br>
In my case 3 arrays dimention are identical.<br>
How can I pass the elements of them like
for(int i = 0 ; i < array1.length ; i++){
my_method(array1[i], array2[i], array3[i]);
}
Here is my attempt.
NOTICE: The transaction is in an uncommitable state.Transaction was rolled back.
NOTICE: query "SELECT QuestionList, UserResponseID_List, UserResponseList" returned 3 columns 42601
ERROR: cannot begin/end transactions in PL/pgSQL
HINT: Use a BEGIN block with an EXCEPTION clause instead.
CONTEXT: PL/pgSQL function dugong.session_hugeinsert(integer,text,text) line 38 at SQL statement
How can I pass values like ordinary procedural language line C/C++, Java, etc.
Best regards
Sarit
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Mike Oppelt | 2015-08-18 14:30:06 | Change Request |
| Previous Message | Jonas.Wolff@fam.ch | 2015-08-14 16:11:48 | pgadmin server status bug |