code: func PgForeignDataWrapperByOid(db XODB, oid pgtypes.Oid) (*PgForeignDataWrapper, error) {
  	var err error
  
  	// sql query
  	const sqlstr = `SELECT ` +
  		`tableoid, cmax, xmax, cmin, xmin, oid, ctid, fdwname, fdwowner, fdwhandler, fdwvalidator, fdwacl, fdwoptions ` +
  		`FROM pg_catalog.pg_foreign_data_wrapper ` +
  		`WHERE oid = $1`
  
  	// run query
  	XOLog(sqlstr, oid)
  	pfdw := PgForeignDataWrapper{}
  
  	err = db.QueryRow(sqlstr, oid).Scan(&pfdw.Tableoid, &pfdw.Cmax, &pfdw.Xmax, &pfdw.Cmin, &pfdw.Xmin, &pfdw.Oid, &pfdw.Ctid, &pfdw.Fdwname, &pfdw.Fdwowner, &pfdw.Fdwhandler, &pfdw.Fdwvalidator, &pfdw.Fdwacl, &pfdw.Fdwoptions)
  	if err != nil {
  		return nil, err
  	}
  
  	return &pfdw, nil
  }
docs: // PgForeignDataWrapperByOid retrieves a row from 'pg_catalog.pg_foreign_data_wrapper' as a PgForeignDataWrapper.
  //
  // Generated from index 'pg_foreign_data_wrapper_oid_index'.