Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error connecting to Heroku DB with PGAdmin

I followed the instructions to Connect to a heroku database with pgadmin. What might cause the following error?

ERROR: column "*my database identifier*" does not exist. 
LINE 9: WHERE datname IN (*my database identifier*)

To be clear my database identifier is the alphanumeric string listed in next to "Database" in HerokuPostgres Connection Settings.

like image 203
Bailey Smith Avatar asked Nov 05 '13 20:11

Bailey Smith


1 Answers

You forgot to quote the identifier as a string literal, so PostgreSQL treats it as a column name - for a column that doesn't exist. Try:

WHERE datname IN ('my_database_identifier');

Note the single quotes.

like image 105
Craig Ringer Avatar answered Nov 15 '22 04:11

Craig Ringer