# pretty_compact

## Description

A compact Unicode bordered table for interactive results. This is the default output format.

Output only. Select it with `FORMAT pretty_compact`. Names ignore ASCII case; use the snake_case name shown here.

A Unicode border surrounds a table with a name header and one display row per SQL row, followed by the row count. It is the default server output for interactive inspection.

Use a data interchange format when a consumer needs a stable row encoding or binary values. Pretty output has no input decoder.

```text
SELECT expressions FORMAT pretty_compact;
```

## Example usage

```sql
SELECT CAST(7 AS Int64) AS id, 'Ada' AS name FORMAT pretty_compact;
```

```text
┌─id─┬─name─┐
│  7 │ Ada  │
└────┴──────┘
(1 rows)
```

## Format settings

Use a statement `SETTINGS` clause; these options are not persisted by `SET`.

| Setting                   | Type     | Default   | Meaning                                                                                                                |
| ------------------------- | -------- | --------- | ---------------------------------------------------------------------------------------------------------------------- |
| `pretty_borders`          | `String` | `unicode` | The characters that draw the table: unicode for box-drawing lines, ascii for plus, minus, and bar.                     |
| `pretty_footer_from_rows` | `UInt64` | `0`       | Repeat the column names in the bottom border when the table shows at least this many rows; 0 never repeats them.       |
| `pretty_max_cell_width`   | `UInt64` | `0`       | Cut a value wider than this many terminal columns and mark the cut; 0 never cuts.                                      |
| `pretty_max_padding`      | `UInt64` | `0`       | Align a column to at most this many terminal columns; wider values extend their own row. 0 aligns to the widest value. |
| `pretty_max_rows`         | `UInt64` | `0`       | Show at most this many rows and report how many were left out; 0 shows every row.                                      |
| `pretty_row_numbers`      | `Bool`   | `0`       | Add a first column that numbers the rows from 1.                                                                       |
