? cvs_get_vanilla.sh
Index: CHANGELOG.txt
===================================================================
RCS file: /cvs/drupal/drupal/CHANGELOG.txt,v
retrieving revision 1.102
diff -u -p -r1.102 CHANGELOG.txt
--- CHANGELOG.txt	22 Oct 2005 23:14:40 -0000	1.102
+++ CHANGELOG.txt	23 Nov 2005 19:48:27 -0000
@@ -49,6 +49,9 @@ Drupal x.x.x, xxxx-xx-xx (development ve
     * made indexer smarter and more robust
     * added advanced search operators (e.g. phrase, node type, ...)
     * added customizable result ranking
+- PostgreSQL support:
+    * removed dependency on PL/pgSQL procedural language
+    * added installation instructions
 
 Drupal 4.6.3, 2005-08-15
 ------------------------
Index: database/database.pgsql
===================================================================
RCS file: /cvs/drupal/drupal/database/database.pgsql,v
retrieving revision 1.146
diff -u -p -r1.146 database.pgsql
--- database/database.pgsql	14 Nov 2005 22:23:11 -0000	1.146
+++ database/database.pgsql	23 Nov 2005 19:48:28 -0000
@@ -1,3 +1,6 @@
+-- Do not show NOTICE: messages, it's hard to spot errors.
+set client_min_messages = 'warning';
+
 --
 -- Table structure for access
 --
@@ -869,35 +872,23 @@ ALTER SEQUENCE menu_mid_seq RESTART 3;
 --- Functions
 ---
 
-CREATE FUNCTION greatest(integer, integer) RETURNS integer AS '
-BEGIN
-  IF $2 IS NULL THEN
-    RETURN $1;
-  END IF;
-  IF $1 > $2 THEN
-    RETURN $1;
-  END IF;
-  RETURN $2;
-END;
-' LANGUAGE 'plpgsql';
+CREATE OR REPLACE FUNCTION "greatest"(numeric, numeric) RETURNS numeric AS '
+  SELECT CASE WHEN (($1 > $2) OR ($2 IS NULL)) THEN $1 ELSE $2 END;
+' LANGUAGE 'sql';
 
-CREATE FUNCTION greatest(integer, integer, integer) RETURNS integer AS '
+CREATE OR REPLACE FUNCTION "greatest"(numeric, numeric, numeric) RETURNS numeric AS '
   SELECT greatest($1, greatest($2, $3));
 ' LANGUAGE 'sql';
 
-CREATE FUNCTION "rand"() RETURNS float AS '
-BEGIN
-  RETURN random();
-END;
-' LANGUAGE 'plpgsql';
-
-CREATE FUNCTION "concat"(text, text) RETURNS text AS '
-BEGIN
-  RETURN $1 || $2;
-END;
-' LANGUAGE 'plpgsql';
+CREATE OR REPLACE FUNCTION "rand"() RETURNS float AS '
+  SELECT random();
+' LANGUAGE 'sql';
+
+CREATE OR REPLACE FUNCTION "concat"(text, text) RETURNS text AS '
+  SELECT $1 || $2;
+' LANGUAGE 'sql';
 
-CREATE FUNCTION "if"(boolean, anyelement, anyelement) RETURNS anyelement AS '
+CREATE OR REPLACE FUNCTION "if"(boolean, anyelement, anyelement) RETURNS anyelement AS '
   SELECT CASE WHEN $1 THEN $2 ELSE $3 END;
 ' LANGUAGE 'sql';
 
