T E Schmitz <[EMAIL PROTECTED]> writes:

> ) as somealias on (model_fk = model_pk)
> 
> (subquery in FROM must have an alias)

ARGH! This is one of the most annoying things about postgres! It bites me all
the time. Obviously it's totally insignificant since it's easy for my to just
throw an "AS x" on the end of it. But damn.

I see there's a comment foreseeing some annoyance value for this in the
source:

          /*
           * The SQL spec does not permit a subselect
           * (<derived_table>) without an alias clause,
           * so we don't either.  This avoids the problem
           * of needing to invent a unique refname for it.
           * That could be surmounted if there's sufficient
           * popular demand, but for now let's just implement
           * the spec and see if anyone complains.
           * However, it does seem like a good idea to emit
           * an error message that's better than "syntax error".
           */

So where can I officially register my complaint? :)

-- 
greg


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to