code: func PgAttrdefByOid(db XODB, oid pgtypes.Oid) (*PgAttrdef, error) {
  	var err error
  
  	// sql query
  	const sqlstr = `SELECT ` +
  		`tableoid, cmax, xmax, cmin, xmin, oid, ctid, adrelid, adnum, adbin, adsrc ` +
  		`FROM pg_catalog.pg_attrdef ` +
  		`WHERE oid = $1`
  
  	// run query
  	XOLog(sqlstr, oid)
  	pa := PgAttrdef{}
  
  	err = db.QueryRow(sqlstr, oid).Scan(&pa.Tableoid, &pa.Cmax, &pa.Xmax, &pa.Cmin, &pa.Xmin, &pa.Oid, &pa.Ctid, &pa.Adrelid, &pa.Adnum, &pa.Adbin, &pa.Adsrc)
  	if err != nil {
  		return nil, err
  	}
  
  	return &pa, nil
  }
docs: // PgAttrdefByOid retrieves a row from 'pg_catalog.pg_attrdef' as a PgAttrdef.
  //
  // Generated from index 'pg_attrdef_oid_index'.