Emils <gnudiff@gmail.com> writes:
> The table structure is:
> object_values
> ==========
> obj_id
> att_id
> value
> namely, each object can have arbitrary number of attributes each of
> them with a value.
> What I want, is a simple table of objects with some of their specific
> attributes, the result should be in form:
> obj_id1 o1att1_value o1att2_value o1att3_value
> obj_id2 o2att1_value o2att2_value o2att3_value
> ...
This isn't an outer-join problem, it's a crosstab problem. Try the
crosstab functions in contrib/tablefunc.
regards, tom lane