Обсуждение: Connect By for 8.0

Поиск
Список
Период
Сортировка

Connect By for 8.0

От
Christopher Kings-Lynne
Дата:
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


Re: Connect By for 8.0

От
Bruce Momjian
Дата:
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,
Pennsylvania19073
 


Re: Connect By for 8.0

От
Robert Treat
Дата:
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


Re: Connect By for 8.0

От
Neil Conway
Дата:
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


Re: Connect By for 8.0

От
Hans-Jürgen Schönig
Дата:
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



Re: Connect By for 8.0

От
Bruce Momjian
Дата:
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,
Pennsylvania19073
 


Re: Connect By for 8.0

От
Tom Lane
Дата:
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


Re: Connect By for 8.0

От
"Joshua D. Drake"
Дата:
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


Вложения

Re: Connect By for 8.0

От
Christopher Browne
Дата:
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.