Further to postgres on Rails in Fedora 18 but OT

Roger arelem at bigpond.com
Thu May 16 23:06:19 UTC 2013


On 05/16/2013 09:51 PM, Max Pyziur wrote:
>
>
> http://lists.fedoraproject.org/pipermail/users/2013-May/435615.html
>
> Sorry deleted your message and then was viewing it on the web.
>
> You write:
> Booking_development=> SELECT "registers".* FROM "registers" ORDER BY
> lname shows nothing because it's a database not a table, but I do not
> understand how to get at it's tables'.
>
> I reply:
>
> The syntax implies that you have a schema by the name of "registers."
>
> Are you trying to see everything in the "registers" table?
>
> If so, I would first check to see what tables are available in 
> booking_development
>
> From a psql prompt, type: \dt
>
> That should show you the tables that are in the public schema; do you 
> also have other schemas? Typing
> \dt *.*
> can give you verbose results but it should show you other schemas if 
> they are there.
>
> If all you want to do is to see what is in the "registers" table, then 
> the SQL would be:
> SELECT * FROM registers ORDER BY lname
> (providing "lname" is a field in the "registers" table).
>
Thanks Max
I though so too. I tried SELECT * FROM registers ORDER BY lname it 
returns nothing, meaning the table doesn't exist or is empty.
So where would Rails put tables?I have no luck finding, yet they do seem 
to 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.

As for the integer problem I think I'll recreate the table and use 
integer instead of string before  it gets useable data entered.
More searching
thanks
Roger



More information about the users mailing list