Thread: Re: [HACKERS] Tutorial
On Thursday 22 July 2004 21:07, Joe Conway wrote: > elein wrote: > > I like inhertitance, but believe that the usefulness > > of our implementation is limited and so the documentation > > should focus on other areas. > > +1 > +1/2 (Since I don't like inheritence) IMHO we ought to try to keep the _tutorial_ free of things that are generally considered against relational design. If we must keep them, move them into thier own section and lable them accordingly. Robert Treat --- Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
Robert Treat <xzilla@users.sourceforge.net> writes: > +1/2 (Since I don't like inheritence) > IMHO we ought to try to keep the _tutorial_ free of things that are generally > considered against relational design. Where is it written that inheritance is against relational design? regards, tom lane
Tom Lane wrote: > Robert Treat <xzilla@users.sourceforge.net> writes: > > +1/2 (Since I don't like inheritence) > > > > IMHO we ought to try to keep the _tutorial_ free of things that are > > generally considered against relational design. > > Where is it written that inheritance is against relational design? I would venture that it is nowhere written that it is part of relational design. It is, however, unambiguously part of object-relational design, if that's what we're aiming for. -- Peter Eisentraut http://developer.postgresql.org/~petere/
On Fri, Jul 23, 2004 at 09:03:30AM +0200, Peter Eisentraut wrote: > Tom Lane wrote: > > Robert Treat <xzilla@users.sourceforge.net> writes: > > > +1/2 (Since I don't like inheritence) > > > > > > IMHO we ought to try to keep the _tutorial_ free of things that > > > are generally considered against relational design. > > > > Where is it written that inheritance is against relational design? > > I would venture that it is nowhere written that it is part of > relational design. It is, however, unambiguously part of > object-relational design, if that's what we're aiming for. I see I have put my foot in it again. Please bear with me here. Object-relational in general is not broken and is being worked on. Custom data-types, custom aggregates, etc., etc. are working just great, and lots of people use them. What *is* broken is table inheritance, and the docs need to reflect this. If the parent table has a foreign key to another table foo, CASCADEing DELETEs on foo leave ghost entries in the tables with inheritance. Please find enclosed a repro, which demonstrates the problem on CVS tip and 7.4.3. Just an FYI, I first discovered this problem in a payment system. Cheers, D -- David Fetter david@fetter.org http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote!
Attachment
David Fetter <david@fetter.org> writes: > What *is* broken is table inheritance, and the docs need to reflect > this. The combination of inheritance with certain other features is broken, yes, and the docs do reflect that (see the bottom of http://www.postgresql.org/docs/7.4/static/ddl-inherit.html for example). I will grant you that this page is a near duplicate of the tutorial's discussion of inheritance, which is surely bad --- either they should be exact duplicates, or one or the other needs rewriting. But I'm not really going to hold still for the docs on inheritance being rewritten by someone who considers the entire concept broken. Maybe we can get elein to do it ;-) regards, tom lane
On Fri, Jul 23, 2004 at 03:31:47PM -0400, Tom Lane wrote: > David Fetter <david@fetter.org> writes: > > What *is* broken is table inheritance, and the docs need to reflect > > this. > > The combination of inheritance with certain other features is broken, > yes, and the docs do reflect that (see the bottom of > http://www.postgresql.org/docs/7.4/static/ddl-inherit.html > for example). > > I will grant you that this page is a near duplicate of the > tutorial's discussion of inheritance, which is surely bad --- either > they should be exact duplicates, or one or the other needs > rewriting. But I'm not really going to hold still for the docs on > inheritance being rewritten by someone who considers the entire > concept broken. Maybe we can get elein to do it ;-) I don't consider the concept broken. The implementation is, in fact, broken, and putting that broken piece in the tutorial is, imnsho, a bad mistake. Cheers, D -- David Fetter david@fetter.org http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote!
On Fri, Jul 23, 2004 at 01:25:56PM -0700, elein wrote: > Perhaps after OSCON I can work with fetter on getting the > documentation clarified. OK? Sounds like fun. There are all kinds of object-relational concepts other than this broken piece. Which ones are good to highlight in that tutorial? Cheers, D -- David Fetter david@fetter.org http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote!
David Fetter <david@fetter.org> writes: > I don't consider the concept broken. The implementation is, in fact, > broken, and putting that broken piece in the tutorial is, imnsho, a > bad mistake. If we're going to remove from the tutorial every feature for which any aspect is deemed by someone to be broken, the tutorial is liable to become quite short. regards, tom lane
On Fri, Jul 23, 2004 at 04:30:40PM -0400, Tom Lane wrote: > David Fetter <david@fetter.org> writes: > > I don't consider the concept broken. The implementation is, in > > fact, broken, and putting that broken piece in the tutorial is, > > imnsho, a bad mistake. > > If we're going to remove from the tutorial every feature for which > any aspect is deemed by someone to be broken, the tutorial is liable > to become quite short. Are there other pieces that are broken? As far as I know, the only documented feature in PostgreSQL that is is table inheritance. Anyhow, there are lots of ways to highlight the object-relational features that PostgreSQL provides. Table inheritance just isn't a good one. Cheers, D -- David Fetter david@fetter.org http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote!
David Fetter <david@fetter.org> writes: > On Fri, Jul 23, 2004 at 04:30:40PM -0400, Tom Lane wrote: >> If we're going to remove from the tutorial every feature for which >> any aspect is deemed by someone to be broken, the tutorial is liable >> to become quite short. > Are there other pieces that are broken? Between the locale behavior and the trailing-spaces behavior, one could make the case that the entire set of textual datatypes are broken. Other examples will occur to your thought if you follow pgsql-bugs. My point here is that one man's unusably broken feature may be another man's quite useful feature. Postgres is a work in progress, and probably always will be. I don't object to pointing out shortcomings, but removing all mention of a feature because it has some shortcomings seems not the best way. regards, tom lane
On Fri, Jul 23, 2004 at 04:58:55PM -0400, Tom Lane wrote: > David Fetter <david@fetter.org> writes: > > On Fri, Jul 23, 2004 at 04:30:40PM -0400, Tom Lane wrote: > >> If we're going to remove from the tutorial every feature for > >> which any aspect is deemed by someone to be broken, the tutorial > >> is liable to become quite short. > > > Are there other pieces that are broken? > > Between the locale behavior and the trailing-spaces behavior, one > could make the case that the entire set of textual datatypes are > broken. Other examples will occur to your thought if you follow > pgsql-bugs. > > My point here is that one man's unusably broken feature may be > another man's quite useful feature. Postgres is a work in progress, > and probably always will be. I don't object to pointing out > shortcomings, but removing all mention of a feature because it has > some shortcomings seems not the best way. Fair enough. How about adding an explanation of the limits of table inheritance illustrated by that example (or other suitable one)? Cheers, D -- David Fetter david@fetter.org http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote!
Perhaps after OSCON I can work with fetter on getting the documentation clarified. OK? --elein On Fri, Jul 23, 2004 at 12:34:13PM -0700, David Fetter wrote: > On Fri, Jul 23, 2004 at 03:31:47PM -0400, Tom Lane wrote: > > David Fetter <david@fetter.org> writes: > > > What *is* broken is table inheritance, and the docs need to reflect > > > this. > > > > The combination of inheritance with certain other features is broken, > > yes, and the docs do reflect that (see the bottom of > > http://www.postgresql.org/docs/7.4/static/ddl-inherit.html > > for example). > > > > I will grant you that this page is a near duplicate of the > > tutorial's discussion of inheritance, which is surely bad --- either > > they should be exact duplicates, or one or the other needs > > rewriting. But I'm not really going to hold still for the docs on > > inheritance being rewritten by someone who considers the entire > > concept broken. Maybe we can get elein to do it ;-) > > I don't consider the concept broken. The implementation is, in fact, > broken, and putting that broken piece in the tutorial is, imnsho, a > bad mistake. > > Cheers, > D > -- > David Fetter david@fetter.org http://fetter.org/ > phone: +1 510 893 6100 mobile: +1 415 235 3778 > > Remember to vote! > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster
Postgresql is not simply a relational database. It is an OBJECT relational database. It was designed to be so from the start. To pretend it was designed otherwise is to deny its design and heritage and the original intent of the the project. c.f. the postgres papers, stonebraker, et.al. And like tom said, "who said inheritance is not relational." It need not break codds rules. --elein On Thu, Jul 22, 2004 at 10:40:45PM -0400, Robert Treat wrote: > On Thursday 22 July 2004 21:07, Joe Conway wrote: > > elein wrote: > > > I like inhertitance, but believe that the usefulness > > > of our implementation is limited and so the documentation > > > should focus on other areas. > > > > +1 > > > > +1/2 (Since I don't like inheritence) > > IMHO we ought to try to keep the _tutorial_ free of things that are generally > considered against relational design. If we must keep them, move them into > thier own section and lable them accordingly. > > Robert Treat > --- > Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster
tgl@sss.pgh.pa.us (Tom Lane) writes: > David Fetter <david@fetter.org> writes: >> On Fri, Jul 23, 2004 at 04:30:40PM -0400, Tom Lane wrote: >>> If we're going to remove from the tutorial every feature for which >>> any aspect is deemed by someone to be broken, the tutorial is liable >>> to become quite short. > >> Are there other pieces that are broken? > > Between the locale behavior and the trailing-spaces behavior, one could > make the case that the entire set of textual datatypes are broken. > Other examples will occur to your thought if you follow pgsql-bugs. > > My point here is that one man's unusably broken feature may be another > man's quite useful feature. Postgres is a work in progress, and > probably always will be. I don't object to pointing out shortcomings, > but removing all mention of a feature because it has some shortcomings > seems not the best way. Ah, but suggesting that people devote time to adding documentation for less controversial features, so that we actually _do_ see some more documentation, seems a good thing :-). -- output = reverse("moc.enworbbc" "@" "enworbbc") http://cbbrowne.com/info/multiplexor.html Why isn't phonetic spelled the way it sounds?