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

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…

Contents