We study the metal abundances of F and G type stars in the Galactic disk and halo using the Canada France-Hawaii Telescope Legacy Survey D4 field. For a sample of stars within 7 kpc of the Galactic plane, we derive mean abundance values of [Fe/H] = -0.77 +/- 0.36 dex for the thick disk, and [Fe/H] = -1.42 +/- 0.98 dex for the stellar halo, respectively. These metallicites are consistent with the metallicity estimates from the Sloan Digital Sky Survey Data Release 6. We do not find a vertical abundance gradient for the thick disk between 1 kpc and 4 kpc. However, stars within 1 kpc of the Galactic plane are saturated in our dataset, and therefore we cannot rule out the observed vertical metallicity gradient for the thick disk stars in the SDSS. Moreover, we find a negative trend in the halo metallicity with increasing distance from the Galactic plane. This trend could be due to a contribution from an increasing number of very metal poor stars that belong to the outer halo. However, systematic effects in photometric metallicities are largest for the most metal poor stars, and therefore these effects cannot be ruled out.