Re: refdb db in menu?
"Markus Hoenicka" <[email protected]>
| Newsgroups | gmane.text.refdb.devel |
|---|---|
| Message-ID | <[email protected]> |
Michael Smith writes: > hmm, I realize now that naming the base db "refdb" is arbitrary. I guess > a user could choose during install to call the base database "mybasedb" > or whatever, and then could create another database called "refdb", and > have references added to that. > No, the name is not arbitrary. It is hard-coded in the main header file. The name changes once in a while if I change the database schema and want to allow users to run parallel installations of RefDB using the old and the new schemas at the same time. > Or to make it more configurable, we could add refdb-listdb-ignore-list > variable, again with default value "refdb", but make it a list. Users > could put multiple names into it that way, and then wouldn't need to > mess around with trying to figure out how to construct a regex and > express it in whatever syntax their backend database supported. > > And that way, we could also include the built-in database names for the > backends -- i.e. Postgres's "template0" and "template1" databases, and > whatever the names are of the built-in databases that MySQL sets up. > The latter is "mysql" (who would have guessed that?). > How does that sound? > I think it may be useful in quite a couple of cases, so I'd suggest to add such a list. This black list together with the regexp that allows to define a white list should be sufficient to pick the right databases. > Now that I write all that, though, I wonder whether that logic might not > be better handled on the RefDB side -- so that refdbd -C listdb wouldn't > return the name of the base RefDB database, whatever its name, or of the > built-in backend database names. > I could do this of course, but it is still a half-assed solution as it does not solve the problem of non-RefDB databases served by the same database engine. A real solution would require refdbd to test each database returned by listdb whether or not it is a RefDB database, e.g. by running a query that retrieves values of all fields listed by their names. This would also filter out databases that the user has no permission to access anyway. Should I put this on my todo list? regards, Markus -- Markus Hoenicka [email protected] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click