Re: Outer joins? - Mailing list pgsql-sql

From Tom Lane
Subject Re: Outer joins?
Date
Msg-id 1267.1146238270@sss.pgh.pa.us
Whole thread Raw
In response to Outer joins?  (Emils <gnudiff@gmail.com>)
List pgsql-sql
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


pgsql-sql by date:

Previous
From: Ross Johnson
Date:
Subject: Re: set return function is returning a single record,
Next
From: Guy Fraser
Date:
Subject: Re: LinkedList