code: func PgForeignTableByFtrelid(db XODB, ftrelid pgtypes.Oid) (*PgForeignTable, error) {
  	var err error
  
  	// sql query
  	const sqlstr = `SELECT ` +
  		`tableoid, cmax, xmax, cmin, xmin, ctid, ftrelid, ftserver, ftoptions ` +
  		`FROM pg_catalog.pg_foreign_table ` +
  		`WHERE ftrelid = $1`
  
  	// run query
  	XOLog(sqlstr, ftrelid)
  	pft := PgForeignTable{}
  
  	err = db.QueryRow(sqlstr, ftrelid).Scan(&pft.Tableoid, &pft.Cmax, &pft.Xmax, &pft.Cmin, &pft.Xmin, &pft.Ctid, &pft.Ftrelid, &pft.Ftserver, &pft.Ftoptions)
  	if err != nil {
  		return nil, err
  	}
  
  	return &pft, nil
  }
docs: // PgForeignTableByFtrelid retrieves a row from 'pg_catalog.pg_foreign_table' as a PgForeignTable.
  //
  // Generated from index 'pg_foreign_table_relid_index'.