Re: replacing dbm_* with dba_*
| From: | Sascha Schumann | Date: | Sun, 20 Jun 1999 15:03:26 +0000 |
| Subject: | Re: replacing dbm_* with dba_* | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-7220@lists.php.net to get a copy of this message | ||
On Sun, Jun 20, 1999 at 10:49:41AM -0400, Jim Jagielski wrote:
> Sascha Schumann wrote:
> >
> > >
> > > The one thing I seem to recall (I'll check later today and tomorrow)
> > > is that dba_open did not support the 'c' open (r/w but no truncate
> > > if the file exists)
> >
> > 'w'. Please look at the documentation.
> >
> > 'r' - read
> > 'w' - read/write
> > 'n' - truncate, read/write
>
> There's another posting I just send out about that... :)
>
> >
> > > and ./configure didn't correctly determine when using db1.x and
> > > not db2.x.
> >
> > We don't support db1 (if you mean Sleepycat's DB1.xx)
>
> Hmmmm.... since dbm_ does, then I think dropping dbm_ for dba_
> will cause compatibility problems. Some people make not even
> be aware that they are using ndbm ala db mode.
I'm not sure which interface DB1 uses. Maybe the code supports it
by accident? :-)
The include files of glibc-2.1.1 in db1/db.h seem to imply that
the API is comparable to DB2. I'll thankfully accept pointers to
more documentation.
> Does not having a write-only mode make sense? That is RDWR without
> CREAT? Again, dbm_ implements 'w' this way.
Does having a write-only mode make sense?
> Basically, these are just issues involving dropping dbm_ and using
> dba_. There are differences between the 2. Not sure if it makes sense
> to adjust dba_ to be like dbm_ and thus be able to remove dbm_
> (or map it internally to the dba_ function)...
>
> That's for you guys to decide... :) If you'd like me to work a patch
> that addresses these, then I will, but then it means that dba_open's
> 'w' behavior will change :/
Changing APIs is a Bad Thing(tm). Especially, if it's not
absolutely necessary.
--
Regards,
Sascha Schumann
Consultant