text: 
  const pg = require('../lib/pg')
  
  function run (appkit, args) {
    pg.database(appkit, args.app, args.database, function(err, db) {
      if(err) {
        return appkit.terminal.error(err)
      }
  
    let query = `
  SELECT relname AS name,
         seq_scan as count
  FROM
    pg_stat_user_tables
  ORDER BY seq_scan DESC;
  `
  
      pg.exec(db, query, function(err, data) {
        if(err) {
          appkit.terminal.error(err);
        } else {
          appkit.terminal.table(data);
        }
      })
    })
  }
  
  
  module.exports = {
    init:function (appkit) {
      let require_options = {
        'app':{
          'alias':'a',
          'demand':false,
          'string':true,
          'description':'The app to act on.'
        },
        'database':{
          'alias':'d',
          'demand':false,
          'string':true,
          'description':'The postgresql URL of the database to pull statistics (postgres://user:pass@host:port/database format)'
        }
      }
  
      appkit.args.command('pg:seq-scans', 'show the count of sequential scans by table descending by order', require_options, run.bind(null, appkit))
        .command('pg:seq_scans', false, require_options, run.bind(null, appkit))
    },
    update:function() {},
    'group':'pg',
    'help':'manage postgres databases',
    'primary':false
  }
  