I'm a complete noob to PostgreSQL, so I'm probably missing something completely obvious.

Connected to my local db via psql on terminal. Any command I run to make db changes, or even a simple select does nothing. No error, just no results.

I can use the shell commands createdb, dropdb just fine.

Got a site running in Ruby on Rails, RefineryCMS, using the local PostgreSQL db, so I know the db has data and is working - I just can't seem to query or modify it via psql.

What am I missing?

Mac OS X Lion, pg v 9.2.

closed as too localized by Jack Douglas Sep 24 '12 at 7:48

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

  • thanks for posting and providing your solution - I think the issue you had is 'too localized' to be of benefit to others so on that basis I'm closing. – Jack Douglas Sep 24 '12 at 7:48
  • 1
    As a note, as someone who has supported PostgreSQL for others, this is remarkably common. – Chris Travers Sep 30 '12 at 3:13
  • 4
    Very disappointed that this has been closed, since I'm having the same problem on a windows machine, and the solution is not simply adding a semicolon. The issue begins at random, and I have to restart the postgres service in order for queries to even be responsive. – Amalgovinus May 28 '15 at 0:07
  • Same problem on linux with a python CMS. This question is not too localized. – Ortomala Lokni Oct 20 '16 at 13:34

Jumped on the IRC postgresql channel and had this answered in 30 seconds.

Issue was that I was not ending my SQL commands with a semicolon. Doh!

  • 1
    As a note, you can tell the context of a line by looking at the prompt. Usually the prompt looks something like [dbname][line status][user rights]. Line status can be a type of quote, an = for a new line or a - for continuation. User rights are # for superuser or > for non-super-user. – Chris Travers Sep 30 '12 at 3:16

Not the answer you're looking for? Browse other questions tagged or ask your own question.