Help with a view - Mailing list pgsql-sql

From Leif B. Kristensen
Subject Help with a view
Date
Msg-id 200509221929.36043.leif@solumslekt.org
Whole thread Raw
List pgsql-sql
I've created a view 'principals' that gives me this output:

pgslekt=> select * from principals where event=15821;person | event | place | sort_date  | tag_type
--------+-------+-------+------------+----------     2 | 15821 |  1152 | 1999-09-17 |        4     3 | 15821 |  1152 |
1999-09-17|        4
 
(2 rows)

How do I go about selecting the "other" person of this event, given that 
I have one of them and the event number? 

I'd also like a view that gives me the two rows combined into one, with 
"person" replaced by p1 and p2.
-- 
Leif Biberg Kristensen
http://solumslekt.org/


pgsql-sql by date:

Previous
From: andy rost
Date:
Subject: Using descriptor areas to insert
Next
From: Axel Rau
Date:
Subject: Re: Updating cidr column with network operator