ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilDBPostgreSQL.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 
5 include_once ("./Services/Database/classes/class.ilDB.php");
6 
18 class ilDBPostgreSQL extends ilDB
19 {
20 
24  function getDSN()
25  {
26  return "pgsql://".$this->getDBUser().":".$this->getDBPassword()."@".
27  $this->getDBHost()."/".$this->getDBName();
28  }
29 
33  function getDBType()
34  {
35  return "postgresql";
36  }
37 
41  static function getReservedWords()
42  {
43  // version: 8.3.6
44  // url: http://www.postgresql.org/docs/current/static/sql-keywords-appendix.html
45  return array(
46  "ALL", "ANALYSE", "ANALYZE", "AND", "ANY", "ARRAY",
47  "AS", "ASC", "ASYMMETRIC", "AUTHORIZATION", "BETWEEN", "BINARY", "BOTH",
48  "CASE", "CAST", "CHECK", "COLLATE", "COLUMN", "CONSTRAINT", "CREATE",
49  "CROSS", "CURRENT_DATE", "CURRENT_ROLE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "CURRENT_USER", "DEFAULT",
50  "DEFERRABLE", "DESC", "DISTINCT", "DO", "ELSE", "END", "EXCEPT",
51  "FALSE", "FOR", "FOREIGN", "FREEZE", "FROM", "FULL", "GRANT",
52  "GROUP", "HAVING", "ILIKE", "IN", "INITIALLY", "INNER", "INTERSECT",
53  "INTO", "IS", "ISNULL", "JOIN", "LEADING", "LEFT", "LIKE",
54  "LIMIT", "LOCALTIME", "LOCALTIMESTAMP", "NATURAL", "NEW", "NOT", "NOTNULL",
55  "NULL", "OFF", "OFFSET", "OLD", "ON", "ONLY", "OR",
56  "ORDER", "OUTER", "OVERLAPS", "PLACING", "PRIMARY", "REFERENCES", "RETURNING",
57  "RIGHT", "SELECT", "SESSION_USER", "SIMILAR", "SOME", "SYMMETRIC", "TABLE",
58  "THEN", "TO", "TRAILING", "TRUE", "UNION", "UNIQUE", "USER",
59  "USING", "VERBOSE", "WHEN", "WHERE", "WITH"
60  );
61  }
62 
66  function initConnection()
67  {
68  }
69 
74  function now()
75  {
76  return "now()";
77  }
78 
82  function supportsFulltext()
83  {
84  return false;
85  }
86 
96  public function lockTables($a_tables)
97  {
98  return true;
99  }
100 
105  public function unlockTables()
106  {
107  return true;
108  }
109 
110 }
111 ?>