Re: [GENERAL] swap relations to be able to execute a left join

2005-12-09 Thread David Rio Deiros
On Fri, Dec 09, 2005 at 12:29:02PM -0700, Michael Fuhr wrote: > On Fri, Dec 09, 2005 at 02:17:59PM -0500, Tom Lane wrote: > > Michael Fuhr <[EMAIL PROTECTED]> writes: > > > Hmm...I get errors in MySQL 5.0.16 with the query as posted so I > > > have to wonder what the real query was. > > > > (tries

Re: [GENERAL] swap relations to be able to execute a left join

2005-12-09 Thread Michael Fuhr
On Fri, Dec 09, 2005 at 02:17:59PM -0500, Tom Lane wrote: > Michael Fuhr <[EMAIL PROTECTED]> writes: > > Hmm...I get errors in MySQL 5.0.16 with the query as posted so I > > have to wonder what the real query was. > > (tries it...) After removing the bogus comma, MySQL 4.1.14 swallows > the query

Re: [GENERAL] swap relations to be able to execute a left join

2005-12-09 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > On Fri, Dec 09, 2005 at 12:47:19PM -0500, Tom Lane wrote: >> Your coworker is depending on a flat-out-incorrect behavior of MySQL. > Hmm...I get errors in MySQL 5.0.16 with the query as posted so I > have to wonder what the real query was. (tries it...)

Re: [GENERAL] swap relations to be able to execute a left join

2005-12-09 Thread Michael Fuhr
On Fri, Dec 09, 2005 at 12:47:19PM -0500, Tom Lane wrote: > Right. MySQL apparently thinks that JOIN has the same precedence as > comma in a FROM-list, but anyone who has bothered to read the SQL > standard knows that JOIN is supposed to bind tighter than comma. > Your coworker is depending on a f

Re: [GENERAL] swap relations to be able to execute a left join

2005-12-09 Thread Tom Lane
Jaime Casanova <[EMAIL PROTECTED]> writes: > On 12/9/05, David Rio Deiros <[EMAIL PROTECTED]> wrote: >> I am sure there is a good reason why you have to swap the relations >> in PostgreSQL. Anyone? > Because PostgreSQL is not broken... > What i see in this SELECT is an LEFT JOIN between AT and U

Re: [GENERAL] swap relations to be able to execute a left join

2005-12-09 Thread Jaime Casanova
On 12/9/05, David Rio Deiros <[EMAIL PROTECTED]> wrote: > Hi there, > > The other day, a coworker who loves mysql was complaining to me because > he had a hard time to find out why this query didn't work on PostgreSQL: > [..select..] >FROM >Artifact_Revisions AR, >Revisions_to_T

Re: [GENERAL] swap relations to be able to execute a left join

2005-12-09 Thread Karsten Hilbert
On Fri, Dec 09, 2005 at 09:16:15AM -0800, David Rio Deiros wrote: > The other day, a coworker who loves mysql was complaining to me because > he had a hard time to find out why this query didn't work on PostgreSQL: ... > FROM > Artifact_Revisions AR, > Revisions_to_Types RTT, >

[GENERAL] swap relations to be able to execute a left join

2005-12-09 Thread David Rio Deiros
Hi there, The other day, a coworker who loves mysql was complaining to me because he had a hard time to find out why this query didn't work on PostgreSQL: SELECT AR.artifact_id, AT.type_nm, AR.title, U.dept, FROM Artifact_Revisions AR, Revis