Question

ManagedDatabase pg_stat_statements total_time column does not exist

Posted June 6, 2021 273 views
PostgreSQL

I am using postgresql ManagedDatabase of digitalocean. While trying to query on pgstatstatements I found this error. total_hours column is not there in the table. But, on postgresql docs and locally the column did exist. Anyone faced this error? What’s the solution for that?

2 comments
  • Sorry to divert your question but… How did you avoid an “<insufficient privilege>” issue?

  • If this can be of any help, I have a total_time column not total_hours:

    => \d pg_stat_statements 
                        View "public.pg_stat_statements"
           Column        |       Type       | Collation | Nullable | Default 
    ---------------------+------------------+-----------+----------+---------
     userid              | oid              |           |          | 
     dbid                | oid              |           |          | 
     queryid             | bigint           |           |          | 
     query               | text             |           |          | 
     calls               | bigint           |           |          | 
     total_time          | double precision |           |          | 
    
Submit an answer

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!