Re: [PHP4BETA] odbc_close

From: Date: Mon, 13 Mar 2000 06:17:03 +0000
Subject: Re: [PHP4BETA] odbc_close
References: 1 2 3 4 5 6 7  Groups: php.version4 
Request: Send a blank email to php-version4+get-12020@lists.php.net to get a copy of this message
On Sun, Mar 12, 2000 at 08:17:17PM -0800, Leo Baschy wrote: > Thies, > > I think what you are writing is wrong, to say it nicely. You > started giving that advice a couple of weeks ago. Maybe that > works for Oracle, but it messes up things with ODBC. From > extensive system design experience, plus having started to look > at this specific code, I can tell you from a guts feeling > level, intuitively, that you are wrong. leo, i think you're really missing the point here - it's not about me or you beeing wrong - i think i do have some understandings about system-designs and php-internals. please don't try to make yourself look bigger and others (in this case me) look smaller. that's *not* going to work and it *not* the way to make your opinion about something more accepted that eg mine. > > Are you even using ODBC yourself? I have to use ODBC all the > time, in some quite complicated scripts, and I need it to work > like a clockwork. sorry, you're missing the point again - it's *not* about odbc, it's about stability and design. all the stuff i did for php crashes at least once a day;-) - man, that's what it's all about. you're targetign the wrong person. all of us are interested in having a rock-solid php, not only you... > > I share interest in stability, cleanliness of design, etc. I > agree that reference counting is a good thing in general. But > I think there are some serious flaws in the logic you are > using. For some things you use a wrench, for others a > screwdriver. Using the wrong tool breaks things. > > As I have said in another message, a lot depends on whether you > consider the odbc_result to be your access to get data from a > statement on a connection, which hence has to go away when the > statement is closed, or whether you think of it as an object of > its own. I'd stick with ODBC's paradigm and just see it as > access which has to go away. Why a new paradigm, if there is > one that is known? If you don't like ODBC, don't use it. If > you use it, use it as it is meant to be used. And if we'd > adopt your way of looking at things, odbc_result having a life > of its own, we'd have to do quite some coding to keep that > object functioning reasonably. > > I _must_ close connections in a system where the number of > connections is limited by license, and I _must_ close > connections for many other reasons, including performance and > improved concurrent use. so what's the deal? so you're saying you want to write spagetthi-code (sorry for the word) and than call odbc_close() and everything is fine? hmm, i really prefer (and talking from my own limited expirience) that things are done in order (statements get closed *before* connections - and that nicely "behind the curtain"). if you need an extra call kill_this_connection_no_matter_what_is_outstanding() - why not? the normal guy would never need it, but we're an open-source project. (this could even be called odbc_close() - weird, but true - and it would not even make a difference for clean written code : $c=opencon(); $r=getresult($c,...); freeresult($r); closecon($c); if you ommit line 3 and 4 it will still work the same way using my methods.. ) > > I have to exercise extreme restraint to use nice words while I > feel you are wasting other people's time with your advice in > this context. You probably have good intentions, but I am > afraid you only have understood half of the issue. ... > > There is a minor chance that I am wrong and you are right, but > I'd be surprised that I'd be making a mistake at something I > have been doing right so many times in other systems. > > My take on it is: I need php_odbc to work really well. What > you are writing is 60% interesting, but also 60% wrong. and 100% working > > Oracle is not equal to ODBC. Don't force something that isn't. > To promise "all databases the same" might be popular to get > votes in the next election, or to sell something, but it is > wrong. If you really want them to be the same, access Oracle > through an ODBC driver. Even if we think all men are equal we > still can't force them to have the same shape noses, same > texture of hair, and same skin pigmentation. Don't promise > "all databases interfaces the same". That is a bad promise, > we'd lose the specific powerful features they have. If you > make everything the same, the least common denominator, you > won't have any powerful features left. i never wanted to make odbc into oracle! i just say that php should behave in a nice consistent way. there have been problems in database shudown code since i know php (read the cvs-history). php4 and ref-counting can make sure that things get cleaned up in order which is what most databases like. ... i do understand your points but IMHO you're not understanding mine. lets try to keep this polite - > > - Leo Baschy <nirvana@got.net> >

« previous php.version4 (#12020) next »