blob: b96a62ebc3576b2afab08b1799a77abbe01a52c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
<?php
class FreshRSS_EntryDAOPGSQL extends FreshRSS_EntryDAOSQLite {
public function sqlHexDecode($x) {
return 'decode(' . $x . ", 'hex')";
}
public function sqlHexEncode($x) {
return 'encode(' . $x . ", 'hex')";
}
protected function autoUpdateDb($errorInfo) {
return false;
}
protected function addColumn($name) {
return false;
}
public function size($all = true) {
$db = FreshRSS_Context::$system_conf->db;
$sql = 'SELECT pg_size_pretty(pg_database_size(?))';
$values = array($db['base']);
$stm = $this->bd->prepare($sql);
$stm->execute($values);
$res = $stm->fetchAll(PDO::FETCH_COLUMN, 0);
return $res[0];
}
}
|