public function getIndexes( $oid )
    {

        // load primary keys
        $query = new Query(
            "SELECT string_to_array( indkey::text, ' ') AS keys, * FROM pg_index WHERE indrelid = %oid:int%",
            array( 'oid' => $this->get('oid') )
        );

        $indexes = $this->db->query( $query )->fetch(Result::TYPE_DETECT);

        foreach( $this->indexes as &$index ) {

            $index['columns'] = array();

            foreach( $index['keys'] as $columnIndex ) {
                $index['columns'][] = sprintf(
                    '%s.%s',
                    $oid,
                    $columnIndex
                );
            }

        }

        return $indexes;

    }
public function getIndexes( $oid )
    {

        // load primary keys
        $query = new Query(
            "SELECT string_to_array( indkey::text, ' ') AS keys, * FROM pg_index WHERE indrelid = %oid:int%",
            array( 'oid' => $this->get('oid') )
        );

        $indexes = $this->db->query( $query )->fetch(Result::TYPE_DETECT);

        foreach( $this->indexes as &$index ) {

            $index['columns'] = array();

            foreach( $index['keys'] as $columnIndex ) {
                $index['columns'][] = sprintf(
                    '%s.%s',
                    $oid,
                    $columnIndex
                );
            }

        }

        return $indexes;

    }
public function getIndexes ( $ oid ) { // load primary keys $ query = new Query ( "SELECT string_to_array( indkey::text, ' ') AS keys, * FROM pg_index WHERE indrelid = %oid:int%" , array ( 'oid' => $ this -> get ( 'oid' ) ) ) ; $ indexes = $ this -> db -> query ( $ query ) -> fetch ( Result :: TYPE_DETECT ) ; foreach ( $ this -> indexes as & $ index ) { $ index [ 'columns' ] = array ( ) ; foreach ( $ index [ 'keys' ] as $ columnIndex ) { $ index [ 'columns' ] [ ] = sprintf ( '%s.%s' , $ oid , $ columnIndex ) ; } } return $ indexes ; }
Get relation indexes from a oid
@param String $oid
@return array()
Get relation indexes from a oid