From: Eric B. <er...@eb...> - 2008-09-25 15:14:29
|
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 |