pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Continue with the original idea, about JOINS....
4+ messages / 4 participants
[nested] [flat]

* Continue with the original idea, about JOINS....
@ 2004-06-25 21:56 Jhonatas M. Rodríguez <jhonatas_rod@yahoo.com>
  2004-06-25 22:19 ` Re: Continue with the original idea, about JOINS.... Tom Lane <tgl@sss.pgh.pa.us>
  2004-06-25 22:23 ` Re: Continue with the original idea, about JOINS.... Stephan Szabo <sszabo@megazone.bigpanda.com>
  2004-06-26 04:56 ` Re: Continue with the original idea, about JOINS.... Sam Barnett-Cormack <s.barnett-cormack@lancaster.ac.uk>
  0 siblings, 3 replies; 4+ messages in thread

From: Jhonatas M. Rodríguez @ 2004-06-25 21:56 UTC (permalink / raw)
  To: pgsql-admin

Thank you at all for yours request



   Hey, i have a question about of the uses the joins
in PostgreSQL.

In SQL Server the joins i can use with the simbol(*),
Example:. the right join is 
"table1.field1 =* table2.field2"

In Oracle the joins are with the simbol (+),
Example:. the left join is 
"table1.field1 (+)= table2.field2"

What is the simbol the PostgreSQL in the use the
JOINS?....

I want to continue with the original idea, how i do a
join without 
(table1 LEFT JOIN table2 ON (table1.field1 =
table2.field2)
table2 RIGHT OUTER JOIN table1 ON (table2.field2 =
table1.field1))

else with a simbol (as (*,+, anything)).

        Best regards,         

                          Jhonatas M. Rodríguez


=====
Jhonatas M. Rodríguez

_________________________________________________________
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com



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

* Re: Continue with the original idea, about JOINS....
  2004-06-25 21:56 Continue with the original idea, about JOINS.... Jhonatas M. Rodríguez <jhonatas_rod@yahoo.com>
@ 2004-06-25 22:19 ` Tom Lane <tgl@sss.pgh.pa.us>
  2 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2004-06-25 22:19 UTC (permalink / raw)
  To: Jhonatas M. Rodríguez <jhonatas_rod@yahoo.com>; +Cc: pgsql-admin

"=?iso-8859-1?q?Jhonatas=20M.=20Rodr=EDguez?=" <jhonatas_rod@yahoo.com> writes:
> I want to continue with the original idea, how i do a
> join without 
> (table1 LEFT JOIN table2 ON (table1.field1 =
> table2.field2)
> table2 RIGHT OUTER JOIN table1 ON (table2.field2 =
> table1.field1))
> else with a simbol (as (*,+, anything)).

You don't.  Those syntaxes are nonstandard and we don't support them.
The ISO SQL standard defines JOIN, and that's what we support.

			regards, tom lane



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

* Re: Continue with the original idea, about JOINS....
  2004-06-25 21:56 Continue with the original idea, about JOINS.... Jhonatas M. Rodríguez <jhonatas_rod@yahoo.com>
@ 2004-06-25 22:23 ` Stephan Szabo <sszabo@megazone.bigpanda.com>
  2 siblings, 0 replies; 4+ messages in thread

From: Stephan Szabo @ 2004-06-25 22:23 UTC (permalink / raw)
  To: Jhonatas M. Rodríguez <jhonatas_rod@yahoo.com>; +Cc: pgsql-admin

On Fri, 25 Jun 2004, [iso-8859-1] Jhonatas M. Rodríguez wrote:

>    Hey, i have a question about of the uses the joins
> in PostgreSQL.
>
> In SQL Server the joins i can use with the simbol(*),
> Example:. the right join is
> "table1.field1 =* table2.field2"
>
> In Oracle the joins are with the simbol (+),
> Example:. the left join is
> "table1.field1 (+)= table2.field2"
>
> What is the simbol the PostgreSQL in the use the
> JOINS?....
>
> I want to continue with the original idea, how i do a
> join without
> (table1 LEFT JOIN table2 ON (table1.field1 =
> table2.field2)
> table2 RIGHT OUTER JOIN table1 ON (table2.field2 =
> table1.field1))
>
> else with a simbol (as (*,+, anything)).

You don't do outer joins in PostgreSQL with a symbol.  We only
support the standard mandated way of doing the joins. Syntaxes
like the Oracle and SQL Server one above are at best imprecise
and at worst entirely broken(*) so I doubt that we're going to
support one in the future.

(*) - The symbol using syntaxes above are ripe for possible problems
where you have conflicting conditions which you either need to diagnose
or come up with semantics for. Also, since join ordering is potentially
significant to outer join behavior, syntax that hides that is dangerous.



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

* Re: Continue with the original idea, about JOINS....
  2004-06-25 21:56 Continue with the original idea, about JOINS.... Jhonatas M. Rodríguez <jhonatas_rod@yahoo.com>
@ 2004-06-26 04:56 ` Sam Barnett-Cormack <s.barnett-cormack@lancaster.ac.uk>
  2 siblings, 0 replies; 4+ messages in thread

From: Sam Barnett-Cormack @ 2004-06-26 04:56 UTC (permalink / raw)
  To: Jhonatas M. Rodríguez <jhonatas_rod@yahoo.com>; +Cc: pgsql-admin

On Fri, 25 Jun 2004, [iso-8859-1] Jhonatas M. Rodríguez wrote:

> Thank you at all for yours request
>
>
>
>    Hey, i have a question about of the uses the joins
> in PostgreSQL.
>
> In SQL Server the joins i can use with the simbol(*),
> Example:. the right join is
> "table1.field1 =* table2.field2"
>
> In Oracle the joins are with the simbol (+),
> Example:. the left join is
> "table1.field1 (+)= table2.field2"
>
> What is the simbol the PostgreSQL in the use the
> JOINS?....
>
> I want to continue with the original idea, how i do a
> join without
> (table1 LEFT JOIN table2 ON (table1.field1 =
> table2.field2)
> table2 RIGHT OUTER JOIN table1 ON (table2.field2 =
> table1.field1))
>
> else with a simbol (as (*,+, anything)).

The keyword you are looking for is NATURAL, provided the joining field
has the same name in both tables (which is just good design practice).

table1 NATURAL INNER JOIN table2, for example, is equivalent to table1
INNER JOIN table2 ON (table1.table2_keyfield = table2.table2_keyfield)

Feel free to look in the documentation under 'joins' - it's well
described in there.

-- 

Sam Barnett-Cormack
Student of Physics & Maths | Programmer (Perl, PHP, C++, C, whatever)
Lancaster University       | Administrator (PostgreSQL, Linux, whatever)



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


end of thread, other threads:[~2004-06-26 04:56 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-06-25 21:56 Continue with the original idea, about JOINS.... Jhonatas M. Rodríguez <jhonatas_rod@yahoo.com>
2004-06-25 22:19 ` Tom Lane <tgl@sss.pgh.pa.us>
2004-06-25 22:23 ` Stephan Szabo <sszabo@megazone.bigpanda.com>
2004-06-26 04:56 ` Sam Barnett-Cormack <s.barnett-cormack@lancaster.ac.uk>

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