If X and Y are sets, we let P(X, Y) denote the set of all partial transformations from X into Y (that is, all mappings whose domain and range are subsets of X and Y, respectively). If θ ∈ P(Y, X), then P(X, Y) is a so-called "generalized semigroup" of transformations under the "sandwich operation": α * β = α θ β, for each α, β ∈ P(X, Y). We denote this semigroup by P(X, Y, θ) and, in this paper, we characterize Green's relations on it: that is, we study equivalence relations which determine when principal left (or right, or 2-sided) ideals in P(X, Y, θ) are equal. This solves a problem raised by Magill and Subbiah in 1975. We also discuss the same idea for important subsemigroups of P(X, Y, θ) and characterize when these semigroups satisfy certain regularity conditions. © 2013 World Scientific Publishing Company.