From 347bf78ab638b8deb2d062c318167e727f876b31 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Tue, 3 Apr 2007 22:15:30 +0000 Subject: [PATCH] Enforce a consistent datestyle, just in case. --- includes/DatabasePostgres.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/includes/DatabasePostgres.php b/includes/DatabasePostgres.php index 87e8d80bed..c280f487c8 100644 --- a/includes/DatabasePostgres.php +++ b/includes/DatabasePostgres.php @@ -427,6 +427,22 @@ class DatabasePostgres extends Database { dieout(""); } + print "
  • Setting the datestyle to ISO, YMD for user \"$user\" ..."; + $SQL = "ALTER USER $safeuser SET datestyle = 'ISO, YMD'"; + $result = pg_query($this->mConn, $SQL); + if (!$result) { + print "FAILED.
  • \n"; + dieout(""); + } + print "OK\n"; + ## Set for the rest of this session + $SQL = "SET datestyle = 'ISO, YMD'"; + $result = pg_query($this->mConn, $SQL); + if (!$result) { + print "
  • Failed to set datestyle
  • \n"; + dieout(""); + } + ## Fix up the search paths if needed print "
  • Setting the search path for user \"$user\" ..."; $path = $this->quote_ident($wgDBmwschema); -- 2.20.1