With pg installed, you can run the pg:psql
Heroku command to connect to your database and execute commands using the psql interactive terminal:
$ heroku pg:psql
psql (9.3.5, server 9.3.3)
SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
Type "help" for help.
database-name=> |
Heroku tunes postgres server configuration settings, so settings are not necessarrily the defaults. Use the pg_settings
view to see what the config settings are on your actual dabatase instance:
database-name=> select name, short_desc, setting from pg_settings where name like '%constraint_exclusion%';
name | short_desc | setting
----------------------+-------------------------------------------------------------+-----------
constraint_exclusion | Enables the planner to use constraints to optimize queries. | partition
(1 row)
database-name=> \q
$