Bacula-users

Re: [Bacula-users] Postgres functions for interpreting the bacula "LStat" column

2008-12-10 08:10:34
Subject: Re: [Bacula-users] Postgres functions for interpreting the bacula "LStat" column
From: ebollengier <eric AT eb.homelinux DOT org>
To: bacula-users AT lists.sourceforge DOT net
Date: Wed, 10 Dec 2008 05:08:53 -0800 (PST)
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 AT lists.sourceforge DOT 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 AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users