Use postgres catalog to fetch column names.
Use postgres catalog to fetch column names.

Matching column names with regex is not reliable in postgres. Instead
use pg_catalog.attribute to access the correct column names. We need to
handle N rows for a single index as the array to string functions do not
preserve the column order in the index.

Refs #7871

bravo-kernel/cakephp,ndm2/cakephp,petteyg/cakephp,garethellis36/cakephp,berrygoudswaard/cakephp,nrother/cakephp,dakota/cakephp,elboletaire/cakephp,CVO-Technologies/cakephp,bravo-kernel/cakephp,petteyg/cakephp,timhoeppner/cakephp,ADmad/cakephp,ADmad/cakephp,Phillaf/cakephp,cakephp/cakephp,garethellis36/cakephp,garethellis36/cakephp,ADmad/cakephp,nrother/cakephp,HavokInspiration/cakephp,thinkingmedia/cakephp,cakephp-fr/cakephp,jeffblack360/cakephp,jeffblack360/cakephp,HavokInspiration/cakephp,mvdriel/cakephp,gmponos/cakephp,tenkoma/cakephp,elboletaire/cakephp,dakota/cakephp,cakephp/cakephp,dakota/cakephp,ndm2/cakephp,CVO-Technologies/cakephp,Phillaf/cakephp,HavokInspiration/cakephp,tgr0ss/cakephp,cakephp/cakephp,ionas/cakephp,nrother/cakephp,mvdriel/cakephp,dakota/cakephp,davidyell/cakephp,CakeDC/cakephp,timhoeppner/cakephp,CakeDC/cakephp,cakephp-fr/cakephp,justinyost/cakephp,michaelze/cakephp,tgr0ss/cakephp,davidyell/cakephp,ndm2/cakephp,berrygoudswaard/cakephp,bravo-kernel/cakephp,justinyost/cakephp,gmponos/cakephp,berrygoudswaard/cakephp,thinkingmedia/cakephp,ndm2/cakephp,tenkoma/cakephp,CVO-Technologies/cakephp,gmponos/cakephp,michaelze/cakephp,thinkingmedia/cakephp,ionas/cakephp,ionas/cakephp,tgr0ss/cakephp,garethellis36/cakephp,tenkoma/cakephp,justinyost/cakephp,CakeDC/cakephp,ADmad/cakephp,jeffblack360/cakephp,cakephp-fr/cakephp,tenkoma/cakephp,mvdriel/cakephp,elboletaire/cakephp,petteyg/cakephp,davidyell/cakephp,timhoeppner/cakephp,CakeDC/cakephp,mvdriel/cakephp,petteyg/cakephp,michaelze/cakephp,cakephp/cakephp,Phillaf/cakephp