Connect By for 8.0

Started by Christopher Kings-Lynnealmost 21 years ago9 messages
#1Christopher Kings-Lynne
chriskl@familyhealth.com.au

I notice the CONNECT BY patch has been updated for 8.0:

http://gppl.moonbone.ru/

Seriously, we really need to get this into 8.1. Convert it to the
standard WITH RECURSIVE syntax if necessary...

Chris

#2Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Christopher Kings-Lynne (#1)
Re: Connect By for 8.0

Christopher Kings-Lynne wrote:

I notice the CONNECT BY patch has been updated for 8.0:

http://gppl.moonbone.ru/

Seriously, we really need to get this into 8.1. Convert it to the
standard WITH RECURSIVE syntax if necessary...

Yep, we are just waiting for someone to do the work.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#3Robert Treat
xzilla@users.sourceforge.net
In reply to: Bruce Momjian (#2)
Re: Connect By for 8.0

On Wednesday 02 February 2005 12:56, Bruce Momjian wrote:

Christopher Kings-Lynne wrote:

I notice the CONNECT BY patch has been updated for 8.0:

http://gppl.moonbone.ru/

Seriously, we really need to get this into 8.1. Convert it to the
standard WITH RECURSIVE syntax if necessary...

Yep, we are just waiting for someone to do the work.

Actually i believe people want both syntax's as the former is used by oracle
and the latter by db2 (iirc)

--
Robert Treat
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL

#4Neil Conway
neilc@samurai.com
In reply to: Robert Treat (#3)
Re: Connect By for 8.0

Robert Treat wrote:

Actually i believe people want both syntax's as the former is used by oracle
and the latter by db2 (iirc)

I think the past consensus has been to adopt the SQL standard syntax. Is
there any reason to also support the Oracle syntax other than for
compatibility? (And if that is it, I think it's a pretty flimsy reason.)

-Neil

#5Hans-Jürgen Schönig
postgres@cybertec.at
In reply to: Neil Conway (#4)
Re: Connect By for 8.0

Neil Conway wrote:

Robert Treat wrote:

Actually i believe people want both syntax's as the former is used by
oracle and the latter by db2 (iirc)

I think the past consensus has been to adopt the SQL standard syntax. Is
there any reason to also support the Oracle syntax other than for
compatibility? (And if that is it, I think it's a pretty flimsy reason.)

-Neil

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

Neil,

Compatibility is the ONLY reason and it is related to money (the only
language people understand).
We have done a lot of migration here and I can tell you that support for
Oracle style CONNECT BY would make more people happy than the SQL style
syntax.
The reason for that is very simple: Code can be migrated without any
changes (= without introducing potential bugs).
I know that SQL standards are tremendously important but if there is an
easy way to support Oracle syntax as well this is definitely the
preferred way to go.
I think it is important not to think in dogmas (in this case this means
SQL syntax is always better) - there should be a reasonable compromise
between compatibility and standard.
My compromise would be: Support both syntaxes if possible.

Best regards,

Hans

--
Cybertec Geschwinde u Schoenig
Schoengrabern 134, A-2020 Hollabrunn, Austria
Tel: +43/660/816 40 77
www.cybertec.at, www.postgresql.at

#6Christopher Browne
cbbrowne@acm.org
In reply to: Bruce Momjian (#2)
Re: Connect By for 8.0

A long time ago, in a galaxy far, far away, postgres@cybertec.at (Hans-J�rgen Sch�nig) wrote:

I think it is important not to think in dogmas (in this case this
means SQL syntax is always better) - there should be a reasonable
compromise between compatibility and standard.
My compromise would be: Support both syntaxes if possible.

As long as they can co-exist, that seems plausible.

I'd personally rather see the standard form, as it's got a more
diverse set of uses. If introducing the CONNECT BY form did anything
to prevent implementing it the RIGHT way, I'm pretty sure I'm not the
only one that would be most displeased.
--
output = ("cbbrowne" "@" "gmail.com")
http://linuxfinances.info/info/slony.html
If anyone ever markets a really well-documented Unix that doesn't
require babysitting by a phalanx of provincial Unix clones, there'll
be a lot of unemployable, twinky-braindamaged misfits out deservedly
pounding the pavements.

#7Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Hans-Jürgen Schönig (#5)
Re: Connect By for 8.0

Hans-J���rgen Sch���nig wrote:

Neil Conway wrote:

Robert Treat wrote:

Actually i believe people want both syntax's as the former is used by
oracle and the latter by db2 (iirc)

I think the past consensus has been to adopt the SQL standard syntax. Is
there any reason to also support the Oracle syntax other than for
compatibility? (And if that is it, I think it's a pretty flimsy reason.)

-Neil

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

Neil,

Compatibility is the ONLY reason and it is related to money (the only
language people understand).
We have done a lot of migration here and I can tell you that support for
Oracle style CONNECT BY would make more people happy than the SQL style
syntax.
The reason for that is very simple: Code can be migrated without any
changes (= without introducing potential bugs).
I know that SQL standards are tremendously important but if there is an
easy way to support Oracle syntax as well this is definitely the
preferred way to go.
I think it is important not to think in dogmas (in this case this means
SQL syntax is always better) - there should be a reasonable compromise
between compatibility and standard.
My compromise would be: Support both syntaxes if possible.

I can see your point, but imagine if we had Oracle compatibility for
lots of cases --- our system would have either non-standard or duplicate
ways of doing things, and that would be quite confusing.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#8Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#7)
Re: Connect By for 8.0

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Hans-J�rgen Sch�nig wrote:

My compromise would be: Support both syntaxes if possible.

I can see your point, but imagine if we had Oracle compatibility for
lots of cases --- our system would have either non-standard or duplicate
ways of doing things, and that would be quite confusing.

Oracle has the resources to outtalk, outshout, and outlast everyone else
on the SQL standards committee. Despite that, their syntax was not
adopted as the standard. This should give you some clue about how badly
their syntax sucks. Now why exactly should we adopt it?

regards, tom lane

#9Joshua D. Drake
jd@commandprompt.com
In reply to: Tom Lane (#8)
Re: Connect By for 8.0

Tom Lane wrote:

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Hans-J�rgen Sch�nig wrote:

My compromise would be: Support both syntaxes if possible.

Great... code away. I would suggest a:

oracle_compat = true/false in the postgresql.conf

Yes I am kidding. The differences between Oracle and PostgreSQL
for most things is not that great. If the small syntatical
differences are the only thing holding them from using PostgreSQL
they were not that serious in the first place.

Sincerely,

Joshua D. Drake

I can see your point, but imagine if we had Oracle compatibility for
lots of cases --- our system would have either non-standard or duplicate
ways of doing things, and that would be quite confusing.

Oracle has the resources to outtalk, outshout, and outlast everyone else
on the SQL standards committee. Despite that, their syntax was not
adopted as the standard. This should give you some clue about how badly
their syntax sucks. Now why exactly should we adopt it?

regards, tom lane

---------------------------(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

-- 
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - jd@commandprompt.com - http://www.commandprompt.com
PostgreSQL Replicator -- production quality replication for PostgreSQL