Codomains, products and limits I have a proof in front of me of the theorem that if a category $\mathcal{C}$ has equalisers and all small/finite products, then it has all small/finite limits. I'm not sure how standard the proof is (it's in some notes I've taken rather than a book) but I know the result is quite standard so perhaps you'll be familiar enough with it to help me clear up a confusion.
The proof starts as follows:
Let $D: \mathcal{J} \to \mathcal{C}$ be a diagram with $\mathcal{J}$ small/finite. Form the products $P = \prod \limits_{j \in Ob(\mathcal{J})} D(j)$, and $Q = \prod \limits_{\alpha \in Mor(\mathcal{J})} D(\operatorname{cod} \alpha)$, and define $f,\,g: P \to Q$ by $\pi_\alpha f = \pi_{\operatorname{cod} \alpha}$, $\pi_\alpha g = D(\alpha) \pi_{\operatorname{dom} \alpha}$. Then let $(L,e)$ be the equaliser of $f$ and $g$. We go on to show that $L$ gives a limit cone. 
My confusion is early on (I only provided the rest of the proof for context, although I'd imagine it's pretty standard). We define $Q = \prod \limits_{\alpha \in Mor(\mathcal{J})} D(\operatorname{cod} \alpha)$, the product of all the codomains of all the morphisms in $\mathcal{J}$: but then surely isn't that just identical to $P$? Surely, since $\mathcal{J}$ is a category it contains an identity morphism for every object, and that morphism has codomain precisely the object it is the identity for, so isn't $Q$ just the product of all $D(j)$ too? Or is $Q$ simply constructed that way to make it easier to work with $\alpha$? Many thanks.

If there were $only$ identities, then yes, $Q$ would be $P$, but else $Q$ won't be $P$, since there will be repetitions.
For example, if $\mathcal{J}$ is the category with two distinct objects $A, B$ and one arrow $f:A \to B$ (besides the identities $\operatorname{id}_A$ and $\operatorname{id}_B$), then $P=D(A) \times D(B)$, but $Q= D(A) \times D(B) \times D(B)$ (the first two objects are $\operatorname{cod}(\operatorname{id}_A)$ and $\operatorname{cod}(\operatorname{id}_B)$; the second one is $\operatorname{cod}(f)$).
