From the course: PostgreSQL: Client Applications

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Format aligned text output

Format aligned text output

- [Instructor] The display of query results here in your terminal application is called aligned text. For instance, if we run a simple select query, such as SELECT * FROM sales.customers, you'll see what that output looks like. The resulting output uses text characters, such as dashes, plus symbols and these vertical pipe characters in order to create an approximation of a data table with the column and the header row dividing lines. We have some control over the appearance of the aligned text output using some psql meta-commands. To see the current settings, run the meta-command, \pset. This lists out the various display options that we can adjust to our liking. Let's focus on just two of them. I want to take a look at the fieldsep property, as well as the format property. The current format is aligned, which is what gives us the nicely spaced out table view of our data. The fieldsep property is currently a single vertical pipe character. We can change the format by typing in \pset…

Contents