Hello, You can also use the bweb pure PL function for that (see bweb/scripts/bweb-postgresql.sql).
Bye DavidLeeLambert wrote: > > I was looking into making queries for a particular file in a Bacula > Postgres database, and came up with the attached functions. If someone > really wanted to do searches by other attributes, it would be simple to > follow the same pattern. With the functions and functional indexes, a > query like > > SELECT bacula_lstat_mtime(lstat),path.path,filename.name > FROM file > INNER JOIN path ON file.pathid=path.pathid \ > INNER JOIN filename ON file.filenameid=filename.filenameid > WHERE bacula_lstat_mtime(lstat)<'2009-12-05 13:55' > ORDER BY bacula_lstat_mtime(lstat) DESC LIMIT 15 > > is really fast. > > -- > DLL > > > > ------------------------------------------------------------------------------ > SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, > Nevada. > The future of the web can't happen without you. Join us at MIX09 to help > pave the way to the Next Web now. Learn more and register at > http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ > _______________________________________________ > Bacula-users mailing list > Bacula-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bacula-users > -- View this message in context: http://www.nabble.com/Postgres-functions-for-interpreting-the-bacula-%22LStat%22-column-tp20928546p20935066.html Sent from the Bacula - Users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users