Tell me more ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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.

share|improve this 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
As a note, as someone who has supported PostgreSQL for others, this is remarkably common. – Chris Travers Sep 30 '12 at 3:13

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, see the FAQ.

1 Answer

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!

share|improve this answer
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.