code: func PgProcs(db XODB, schema string) ([]*Proc, error) {
  	var err error
  
  	// sql query
  	const sqlstr = `SELECT ` +
  		`p.proname, ` + // ::varchar AS proc_name
  		`pg_get_function_result(p.oid) ` + // ::varchar AS return_type
  		`FROM pg_proc p ` +
  		`JOIN ONLY pg_namespace n ON p.pronamespace = n.oid ` +
  		`WHERE n.nspname = $1`
  
  	// run query
  	XOLog(sqlstr, schema)
  	q, err := db.Query(sqlstr, schema)
  	if err != nil {
  		return nil, err
  	}
  	defer q.Close()
  
  	// load results
  	res := []*Proc{}
  	for q.Next() {
  		p := Proc{}
  
  		// scan
  		err = q.Scan(&p.ProcName, &p.ReturnType)
  		if err != nil {
  			return nil, err
  		}
  
  		res = append(res, &p)
  	}
  
  	return res, nil
  }
docs: // PgProcs runs a custom query, returning results as Proc.