Re: two foreign keys - Mailing list pgsql-novice

From Tom Lane
Subject Re: two foreign keys
Date
Msg-id 14233.1013901960@sss.pgh.pa.us
Whole thread Raw
In response to Re: two foreign keys  ("Josh Berkus" <josh@agliodbs.com>)
Responses starting the postmaster  (Brian <Brrrian@Excite.com>)
List pgsql-novice
"Josh Berkus" <josh@agliodbs.com> writes:
> SELECT session_id, session_name, op_start.operator_name,
>  op_end.operator_name
> FROM sessions
>    JOIN operators op_start ON sessions.operator_start_id =
>  op_start.operator_id
>    JOIN operators op_end ON sessions.operator_end_id =
>  op_start.operator_id;

I think you meant "ON sessions.operator_end_id = op_end.operator_id"
at the end there.  Otherwise a fine example...

            regards, tom lane

pgsql-novice by date:

Previous
From: "Patrick Hatcher"
Date:
Subject: Re: Updated to 7.2 now can't createlang..
Next
From: allanwind@mediaone.net (Allan M. Wind)
Date:
Subject: Object Relational Mapping