On Fri, 17 May 2013, Roger wrote:
On 05/16/2013 09:51 PM, Max Pyziur wrote:
[... deleted for the sake of brevity ...]
Late getting back to the party ...
I though so too. I tried SELECT * FROM registers ORDER BY lname it returns
nothing, meaning the table doesn't exist or is empty.
If the table doesn't exist, you'll get a message saying "relation doesn't
exist." More like, there is no data in the table.
So where would Rails put tables?I have no luck finding, yet they do
exist and show results in the rails app.
It seems the registers table is not in booking_development and I cannot find
where it may be.
Start with finding the database name; from a command-line, type:
That should give you a list of postgresql databases hosted on a machine.
It will also tell you who the owner is (and that gives you a clue as to
From a commandline:
will get you into postgresql's database monitor, providing you have
Once in the monitor, you can type
for list of tables.
Conversely, you can get a schema by typing from a commandline:
pg_dump -s <databasename>
Output it to a file (pg_dump -s <databasename> > filename) or grep out the
lines in which you are interested
(pg_dump -s <databasename> | grep "CREATE TABLE")
is one way of getting a list of tables from the commandline.
As for the integer problem I think I'll recreate the table and
instead of string before it gets useable data entered.