func ReadPSQLTable(reader io.Reader, count int64) (*TabularData, error) {
	scanner := bufio.NewScanner(reader)
	scanner.Scan()
	columnString := scanner.Text()
	columns := parseColumns(columnString)
	scanner.Scan()
	rows := [][]string{}
	var i int64
	for i = 0; i < count && scanner.Scan(); i++ {
		if scanner.Text()[0] == '(' {
			break
		}
		rows = append(rows, parseRow(columns, scanner.Text()))
	}
	if err := scanner.Err(); err != nil {
		return nil, err
	}
	return &TabularData{
		Columns: columns,
		Rows:    rows,
	}, nil
}
Parses Postgres output format:

colA | colB | colC
------+------+-----
foo  | bar  | baz
foo2 | bar2 | baz2
(2 rows)
package vxsv
import (
	"bufio"
	"io"
	"strings"
)