(self)
return col_names
Load the list of the columns available under the `pg_stat_statements` table. This must be queried because
        version is not a reliable way to determine the available columns on `pg_stat_statements`. The database can
        be upgraded without upgrading extensions, even when the extension is included by default.
Load the list of the columns available under the `pg_stat_statements` table. This must be queried because
        version is not a reliable way to determine the available columns on `pg_stat_statements`. The database can
        be upgraded without upgrading extensions, even when the extension is included by default.
Load the list of the columns available under the pg_stat_statements table . This must be queried because version is not a reliable way to determine the available columns on pg_stat_statements . The database can be upgraded without upgrading extensions even when the extension is included by default .
def _get_pg_stat_statements_columns(self):
        """
        Load the list of the columns available under the `pg_stat_statements` table. This must be queried because
        version is not a reliable way to determine the available columns on `pg_stat_statements`. The database can
        be upgraded without upgrading extensions, even when the extension is included by default.
        """
        if self._stat_column_cache:
            return self._stat_column_cache

        # Querying over '*' with limit 0 allows fetching only the column names from the cursor without data
        query = STATEMENTS_QUERY.format(
            cols='*', pg_stat_statements_view=self._config.pg_stat_statements_view, limit=0, filters=""
        )
        cursor = self._check._get_db(self._config.dbname).cursor()
        self._execute_query(cursor, query, params=(self._config.dbname,))
        col_names = [desc[0] for desc in cursor.description] if cursor.description else []
        self._stat_column_cache = col_names
        return col_names
def _get_pg_stat_statements_columns ( self ) : if self . _stat_column_cache : return self . _stat_column_cache # Querying over '*' with limit 0 allows fetching only the column names from the cursor without data query = STATEMENTS_QUERY . format ( cols = '*' , pg_stat_statements_view = self . _config . pg_stat_statements_view , limit = 0 , filters = "" ) cursor = self . _check . _get_db ( self . _config . dbname ) . cursor ( ) self . _execute_query ( cursor , query , params = ( self . _config . dbname , ) ) col_names = [ desc [ 0 ] for desc in cursor . description ] if cursor . description else [ ] self . _stat_column_cache = col_names return col_names