Re: syntax of joins

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Andreas <maps(dot)on(at)gmx(dot)net>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: syntax of joins
Date: 2012-04-06 19:23:32
Message-ID: CAFj8pRBc2Qa+_Zap_8VqOQzjaYWXtkajjhKePKs9pYGnkcoX+w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello

2012/4/6 Andreas <maps(dot)on(at)gmx(dot)net>:
> hi,
>
> is there a disadvantage to write a join as
>
> select   *
> from    a, b
> where  a.id = b.a_id;
>

> over
>
> select   *
> from    a join b  on  a.id = b.a_id;
>

yes - newer notation has some advantages

* clean specification join predicate and filter predicate
* simple adaptability to outer join
* increased protection against copy/paste bug that introduce Cartesian product

Regards

Pavel Stehule

> --
> Sent via pgsql-sql mailing list (pgsql-sql(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Rob Sargent 2012-04-06 19:28:08 Re: syntax of joins
Previous Message Andreas 2012-04-06 18:58:33 syntax of joins