code: func PgTablespaceByOid(db XODB, oid pgtypes.Oid) (*PgTablespace, error) {
  	var err error
  
  	// sql query
  	const sqlstr = `SELECT ` +
  		`tableoid, cmax, xmax, cmin, xmin, oid, ctid, spcname, spcowner, spcacl, spcoptions ` +
  		`FROM pg_catalog.pg_tablespace ` +
  		`WHERE oid = $1`
  
  	// run query
  	XOLog(sqlstr, oid)
  	pt := PgTablespace{}
  
  	err = db.QueryRow(sqlstr, oid).Scan(&pt.Tableoid, &pt.Cmax, &pt.Xmax, &pt.Cmin, &pt.Xmin, &pt.Oid, &pt.Ctid, &pt.Spcname, &pt.Spcowner, &pt.Spcacl, &pt.Spcoptions)
  	if err != nil {
  		return nil, err
  	}
  
  	return &pt, nil
  }
docs: // PgTablespaceByOid retrieves a row from 'pg_catalog.pg_tablespace' as a PgTablespace.
  //
  // Generated from index 'pg_tablespace_oid_index'.