code: func PgForeignServerBySrvname(db XODB, srvname pgtypes.Name) (*PgForeignServer, error) {
  	var err error
  
  	// sql query
  	const sqlstr = `SELECT ` +
  		`tableoid, cmax, xmax, cmin, xmin, oid, ctid, srvname, srvowner, srvfdw, srvtype, srvversion, srvacl, srvoptions ` +
  		`FROM pg_catalog.pg_foreign_server ` +
  		`WHERE srvname = $1`
  
  	// run query
  	XOLog(sqlstr, srvname)
  	pfs := PgForeignServer{}
  
  	err = db.QueryRow(sqlstr, srvname).Scan(&pfs.Tableoid, &pfs.Cmax, &pfs.Xmax, &pfs.Cmin, &pfs.Xmin, &pfs.Oid, &pfs.Ctid, &pfs.Srvname, &pfs.Srvowner, &pfs.Srvfdw, &pfs.Srvtype, &pfs.Srvversion, &pfs.Srvacl, &pfs.Srvoptions)
  	if err != nil {
  		return nil, err
  	}
  
  	return &pfs, nil
  }
docs: // PgForeignServerBySrvname retrieves a row from 'pg_catalog.pg_foreign_server' as a PgForeignServer.
  //
  // Generated from index 'pg_foreign_server_name_index'.