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

2008-12-19 Thread David Lee Lambert
The advantage of a C stored procedure is speed: bacula=# SELECT MAX('a'||bacula_lstat_mtime(lstat)) FROM file WHERE fileid100 ; max - a2008-02-27 20:24:10-05 (1 row) Time: 70.689 ms bacula=# SELECT MAX(base64_decode_lstat(12,lstat)*interval '1 second' +

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

2008-12-19 Thread Eric Bollengier
Le Friday 19 December 2008 20:15:37 David Lee Lambert, vous avez écrit : The advantage of a C stored procedure is speed: Yes, for sure but it's also a bit more complex to install... To speedup things (for reading), it's also possible to create an index (i will add the IMMUTABLE parameter) Bye

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

2008-12-10 Thread ebollengier
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

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

2008-12-09 Thread David Lee Lambert
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