Further to postgres on Rails in Fedora 18 but OT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Somewhat very OT and more Rails inclined but I'm hoping someone can help.
After reading on Postgres as advised I went to have a look at the Rails tables. Postgres is working, Rails app "Booking" is up with one table, "reservations", which has some string fields and data has been input for testing.
as an example, psql Booking_development roger puts me into the:
psql (9.2.4)
Type "help" for help.
Booking_development=>

\l shows:---------------------+----------+----------+-------------+-------------+-----------------------
 Booking_development | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
Booking_test | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres | postgres=CTc/postgres template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres | postgres=CTc/postgres

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'. Ok! so how do I access the reservations table and how do I view the contents of fields so that I can experiment with totaling columns please.

In sqlite, the string tables contain numbers so the rails to_i changes them to integer for adding.
How can I do this with postgres please?
Thanks in advance
Roger

The reason I didn't make the numeric fields integer, is because Rails likes to have a select system for fields inputting integers and I do not want this. I have been searching on google all day for answers but as usual, responses from Rails officianados is curt and lacks explanation.
Ta
Roger


--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org




[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux