pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ian Barwick <barwick@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Larry Rosenman <ler@lerctr.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: Query issue/8.0.1/Serendipity
Date: Tue, 8 Mar 2005 17:55:44 +0100
Message-ID: <1d581afe0503080855216ad38f@mail.gmail.com> (raw)
In-Reply-To: <6329.1110296271@sss.pgh.pa.us>
References: <200503080548.17179.ler@lerctr.org>
	<6329.1110296271@sss.pgh.pa.us>

>On Tue, 08 Mar 2005 10:37:51 -0500, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Larry Rosenman <ler@lerctr.org> writes:
> > I have an 8.0.1 server running the Blogging software serendipity, and the
> > following query fails with "relation e not defined", but it is on the first
> > line:
> 
> > "SELECT timestamp FROM serendipity_entries e, serendipity_category c,
> > serendipity_entrycat ec LEFT OUTER JOIN serendipity_entryproperties
> > ep_cache_extended ON (e.id = ep_cache_extended.entryid AND
> > ep_cache_extended.property = 'ep_cache_extended') ...
> 
> Broken SQL that's only ever been tested on MySQL.
> 
> Last I heard, MySQL treated this sort of construct as joining
> left-to-right, ie,
> 
>         FROM e CROSS JOIN c CROSS JOIN ec LEFT JOIN ...
> 
> in which case the left argument of the LEFT JOIN already contains
> e, c, and ec so it's OK for the JOIN condition to use e.  Unfortunately
> for MySQL users everywhere, this is expressly contrary to the SQL spec:
> per spec, JOIN binds more tightly than commas in the FROM-list do.
> 
> (Is this on the mysql gotchas page?)

Nope, although as my plans for the week involve evaluating
Serendipity using PostgreSQL I'll look into it.

Ian Barwick
barwick@gmail.com



view thread (12+ messages)  latest in thread

Message-ID: <1d581afe0503080855216ad38f@mail.gmail.com>
Permalink:  ../1d581afe0503080855216ad38f@mail.gmail.com/
Also on:    postgresql.org/message-id/1d581afe0503080855216ad38f@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: barwick@gmail.com, tgl@sss.pgh.pa.us, ler@lerctr.org
  Subject: Re: Query issue/8.0.1/Serendipity
  In-Reply-To: <1d581afe0503080855216ad38f@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox