Last active
August 29, 2015 14:13
-
-
Save paulghaddad/20a8eb09d10a81887842 to your computer and use it in GitHub Desktop.
LevelUp 6: Can look up and use basic psql commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Demonstrate the Rails command to enter the psql shell. | |
rails dbconsole | |
2. Demonstrate the command to get help on other psql commands. | |
psql --help for general help on psql. | |
From within psql, you can use \? to get the help on psql internal commands or \help for SQL commands. | |
3. Use that command to find out how to list all views, and then to view the query that generated a view. | |
- To list all views: \dv | |
- To view the query that generated a view: select view_definition from information_schema.views; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment