Let me add to the above answer by noting that a stronger result holds and that, in the absence of the Continuum Hypothesis, the problems with the attempted construction of a 4-cycle-free coloring are unavoidable.

To fix notation, if $X$ is a set, $[X]^2$ is the set of 2-element subsets of $X$. We show that any coloring $c:[\omega_2]^2 \rightarrow \omega$ has a monochromatic 4-cycle. This will also give a shorter proof of the negative direction of the Erdos-Kakutani result mentioned above.

Fix $c:[\omega_2]^2 \rightarrow \omega$. For each $\omega_1 \leq \gamma < \omega_2$, find $n_\gamma < \omega$ such that $A^\gamma_{n_\gamma} := \{\alpha < \gamma \mid c(\{\alpha, \gamma\}) = n_\gamma\}$ is uncountable. Find a stationary $S \subseteq \omega_2$ and an $n^* < \omega$ such that, for all $\gamma \in S$, $n_\gamma = n^*$. For each $\gamma \in S$, let $\alpha_\gamma = \min(A^\gamma_{n^*})$, and let $\beta_\gamma = \min(A^\gamma_{n^*} \setminus (\alpha_\gamma + 1))$. By Fodor's Lemma, we can find $\alpha^* < \beta^* < \omega_2$ and a stationary $T \subseteq S$ such that, for all $\gamma \in T$, $(\alpha_\gamma, \beta_\gamma) = (\alpha^*, \beta^*)$. Fix $\gamma < \delta$, both in $T$. Then $c(\{\alpha^*, \gamma\}) = c(\{\gamma, \beta^*\}) = c(\{\beta^*, \delta\}) = c(\{\delta, \alpha^*\}) = n^*$, giving us a monochromatic 4-cycle.

edgecoloring. $\endgroup$ – Benoît Kloeckner Aug 17 '10 at 8:03