[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bacula-devel] Alternative DB structures-Proposal


Hello,

> Eric,
>
> Could you give John some pointers where he might find code in bweb (and
> else
> where if you know of any) that would pick apart the LStat field?

Both Mysql (>5.x?) and Postgresql provide SQL functions that permit to
decode the LStat field on the fly.

example:

SELECT FileId, base64_decode_lstat(8, Lstat) FROM File...

SELECT SUM(base64_decode_lstat(8, Lstat)) FROM File...


This is a very smart way to get information from a web interface. For mysql,
the code seems to be a bit slow right now, but i'm in touch with the
author to correct that.

> It seems to me that there was also some Perl code that did this.  If
> anyone on
> the list knows where this code exists, it would be really helpful to have
> it
> submitted to the Bacula project so that it can be included in the
> examples/database directory.

You can look the base64_decode_lstat() function in
trunk/gui/bweb/script/bweb-postgresql.sql (line 236)

This is only a 20 lines PL function...


> Best regards,
>
> Kern



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bacula-devel mailing list
Bacula-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/bacula-devel


This mailing list archive is a service of Copilot Consulting.