Re: refdb db in menu?

Michael Smith <[email protected]>
Newsgroups gmane.text.refdb.devel
Message-ID <20031215111125.GA2872@theThirdPoliceman>
Hi Markus,

You wrote:

> 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.

Ah, OK. I guess I can then hard-code it into the Emacs code. You say it
changes once in a while, and I remember that it's 'refdb1' for v0.9.3.
Does that mean you alternate it between those two values, and so if I
have the Emacs code filter out both "refdb" and "refdb1", it will handle
things OK if/when you need to change the name again?

>  > 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?).

Heh -- I should have guessed, I guess :)

>  > 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.

OK. But, along with the blacklist, should I just have it hard-coded to
always ignore the following, even if they're not included in the
blacklist? If not, there's a risk of users trying to add RefDB data to
these databases.

  refdb refdb1 mysql template0 template1

>  > 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?

Yes, I think it should be on your todo list. How much of a priority it
should be relative to other things you have on there, I can't say.

  --Mike
signature.asc (application/pgp-signature, 155 B)
-----BEGIN PGP SIGNATURE-----

iD8DBQE/3ZbdsGCNMsnBsxkRAnqZAJ9Ecqm1sEEfLvOtOUW8R+BIMhpEwQCdH3Hc
vP4E2Qi3CoalQiqktwSq/TM=
=33uy
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.