code: func PgQueryColumns(args *internal.ArgType, inspect []string) ([]*models.Column, error) {
  	var err error
  
  	// create temporary view xoid
  	xoid := "_xo_" + internal.GenRandomID()
  	viewq := `CREATE TEMPORARY VIEW ` + xoid + ` AS (` + strings.Join(inspect, "\n") + `)`
  	models.XOLog(viewq)
  	_, err = args.DB.Exec(viewq)
  	if err != nil {
  		return nil, err
  	}
  
  	// query to determine schema name where temporary view was created
  	var nspq = `SELECT n.nspname ` +
  		`FROM pg_class c ` +
  		`JOIN pg_namespace n ON n.oid = c.relnamespace ` +
  		`WHERE n.nspname LIKE 'pg_temp%' AND c.relname = $1`
  
  	// run query
  	var schema string
  	models.XOLog(nspq, xoid)
  	err = args.DB.QueryRow(nspq, xoid).Scan(&schema)
  	if err != nil {
  		return nil, err
  	}
  
  	// load column information
  	return models.PgTableColumns(args.DB, schema, xoid, false)
  }
docs: // PgQueryColumns parses the query and generates a type for it.