Thank you so much for you suggestion, it is probably a better way to normalize the data to a policy data an using multiple tables.
The millions of table is not true (but there are around 60 database instances), but the hundreds of lines of query are the actual queries provided by current db team (actually, all queries from them are more than 200 lines).
I may try both of them since I am half way around my original plan.
To link everything to policy number is my original attempt, the reason I give up and apply array is due to the historical transaction data, status update and multiple policies in one contract. But surly, by summarizing and reformatting the current structure, it will reduce significant number of tables and make it relatively easy.
Thank you again for you advice!!
shore
------------------ Original message ------------------
From: "David G. Johnston";
Sendtime: Wednesday, May 23, 2018 10:29 PM
To: "a"<372660931@qq.com>;
Cc: "Charles Clavadetscher"; "pgsql-general";
Subject: Re: RE: RE: How do I select composite array element that satisfyspecific conditions.