pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
syntax of joins
5+ messages / 3 participants
[nested] [flat]

* syntax of joins
@ 2012-04-06 18:58 Andreas <maps.on@gmx.net>
  2012-04-06 19:23 ` Re: syntax of joins Pavel Stehule <pavel.stehule@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Andreas @ 2012-04-06 18:58 UTC (permalink / raw)
  To: pgsql-sql

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;



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: syntax of joins
  2012-04-06 18:58 syntax of joins Andreas <maps.on@gmx.net>
@ 2012-04-06 19:23 ` Pavel Stehule <pavel.stehule@gmail.com>
  2012-04-06 19:28   ` Re: syntax of joins Rob Sargent <robjsargent@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Pavel Stehule @ 2012-04-06 19:23 UTC (permalink / raw)
  To: Andreas <maps.on@gmx.net>; +Cc: pgsql-sql

Hello

2012/4/6 Andreas <maps.on@gmx.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@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: syntax of joins
  2012-04-06 18:58 syntax of joins Andreas <maps.on@gmx.net>
  2012-04-06 19:23 ` Re: syntax of joins Pavel Stehule <pavel.stehule@gmail.com>
@ 2012-04-06 19:28   ` Rob Sargent <robjsargent@gmail.com>
  2012-04-06 19:46     ` Re: syntax of joins Pavel Stehule <pavel.stehule@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Rob Sargent @ 2012-04-06 19:28 UTC (permalink / raw)
  To: pgsql-sql

On 04/06/2012 01:23 PM, Pavel Stehule wrote:
> Hello
>
> 2012/4/6 Andreas<maps.on@gmx.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@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-sql
>
In other words, no disadvantage :)

-some cranky old guy who still misses "retrieve"



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: syntax of joins
  2012-04-06 18:58 syntax of joins Andreas <maps.on@gmx.net>
  2012-04-06 19:23 ` Re: syntax of joins Pavel Stehule <pavel.stehule@gmail.com>
  2012-04-06 19:28   ` Re: syntax of joins Rob Sargent <robjsargent@gmail.com>
@ 2012-04-06 19:46     ` Pavel Stehule <pavel.stehule@gmail.com>
  2012-04-06 20:14       ` Re: syntax of joins Rob Sargent <robjsargent@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Pavel Stehule @ 2012-04-06 19:46 UTC (permalink / raw)
  To: Rob Sargent <robjsargent@gmail.com>; +Cc: pgsql-sql

2012/4/6 Rob Sargent <robjsargent@gmail.com>:
> On 04/06/2012 01:23 PM, Pavel Stehule wrote:
>>
>> Hello
>>
>> 2012/4/6 Andreas<maps.on@gmx.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@postgresql.org)
>>> To make changes to your subscription:
>>> http://www.postgresql.org/mailpref/pgsql-sql
>>
>>
> In other words, no disadvantage :)
>

Hard to say - for man who fixed critical cartesian products :) in queries

Pavel

> -some cranky old guy who still misses "retrieve"
>
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: syntax of joins
  2012-04-06 18:58 syntax of joins Andreas <maps.on@gmx.net>
  2012-04-06 19:23 ` Re: syntax of joins Pavel Stehule <pavel.stehule@gmail.com>
  2012-04-06 19:28   ` Re: syntax of joins Rob Sargent <robjsargent@gmail.com>
  2012-04-06 19:46     ` Re: syntax of joins Pavel Stehule <pavel.stehule@gmail.com>
@ 2012-04-06 20:14       ` Rob Sargent <robjsargent@gmail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Rob Sargent @ 2012-04-06 20:14 UTC (permalink / raw)
  To: Pavel Stehule <pavel.stehule@gmail.com>; +Cc: pgsql-sql

On 04/06/2012 01:46 PM, Pavel Stehule wrote:
> 2012/4/6 Rob Sargent<robjsargent@gmail.com>:
>> On 04/06/2012 01:23 PM, Pavel Stehule wrote:
>>>
>>> Hello
>>>
>>> 2012/4/6 Andreas<maps.on@gmx.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@postgresql.org)
>>>> To make changes to your subscription:
>>>> http://www.postgresql.org/mailpref/pgsql-sql
>>>
>>>
>> In other words, no disadvantage :)
>>
>
> Hard to say - for man who fixed critical cartesian products :) in queries
>
> Pavel

but doesn't there remain "a join b on a.id != b.id"

(I do use the join syntax -- sometimes, honest)

rjs



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2012-04-06 20:14 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-04-06 18:58 syntax of joins Andreas <maps.on@gmx.net>
2012-04-06 19:23 ` Pavel Stehule <pavel.stehule@gmail.com>
2012-04-06 19:28   ` Rob Sargent <robjsargent@gmail.com>
2012-04-06 19:46     ` Pavel Stehule <pavel.stehule@gmail.com>
2012-04-06 20:14       ` Rob Sargent <robjsargent@gmail.com>

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