From the course: PostgreSQL: Client Applications
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Describe object configuration - PostgreSQL Tutorial
From the course: PostgreSQL: Client Applications
Describe object configuration
- [Instructor] So far, we've seen meta commands that help us explore the contents of the server and the database. You can use the same commands to dive further into the details about individual objects. Let's review what tables we have in the Two Trees Database. We can get that information with \dt. This shows me that I have five tables in the database and we have two in the inventory schema: categories and products. And we have three in the sales schema: customer, order_lines, and orders. Now if you just wanted to know what columns a table contains you can use the \d meta command all by itself and then name the table that you're interested in. For instance, to find the columns that are in the sales.customers table I can type \dsales.customers. This reveals the column names that make up the table. It also shows their data types, as well as the correlation if it's different from the databases default and any null constraints and any default values that might be applied to each column…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Connect to a PostgreSQL server7m 11s
-
(Locked)
Create a database3m 20s
-
Execute SQL commands7m 1s
-
(Locked)
Backslash (meta) commands4m 6s
-
(Locked)
Get help with SQL command keywords5m 36s
-
(Locked)
Execute commands from a file2m 43s
-
(Locked)
List database contents7m 39s
-
(Locked)
Describe object configuration2m 29s
-
(Locked)
Challenge: Obtain database information1m 14s
-
(Locked)
Solution: Obtain database information4m 52s
-
-
-
-
-