Issue status update for http://drupal.org/node/26091 Project: Drupal Version: cvs Component: postgresql database Category: tasks Priority: normal Assigned to: Anonymous Reported by: Smirnov Updated by: Smirnov Status: patch Attachment: http://drupal.org/files/issues/INSTALL.txt.patch (removes plpgsql) (594 bytes) If this issue to add installation instructions for PG [1] gets approved and committed then please use this patch to update /INSTALL.txt/ so that it no longer mentions plpgsql. [1] http://drupal.org/node/25792 Smirnov Previous comments: ------------------------------------------------------------------------ June 30, 2005 - 07:32 : Smirnov Attachment: http://drupal.org/files/issues/database.pgsql_4.patch (1.85 KB) In /database/database.pgsql/ many of the functions such as *greatest(integer, integer)* were defined with /plpgsql/. This patch simply changes the definitions a bit to use regular SQL (SELECT) -- so users won't have to load /plpgsql/ with /createlang/ anymore. In addition, I have updated the *IF(expr1,expr2,expr3)* function to reflect MySQL's definition of it [2]. Before *expr1* always had to be passed as a /boolean/, and now it is /anyelement/. Also now *expr1* is true if it's both NOT NULL and 0. Anyways, this means that if Drupal modules are passing integers when using the sql *IF()* function, the query will now work. NOTE: The IF() function is not ANSI SQL, perhaps in a later patch we can replace all usage of it with CASE? [2] http://dev.mysql.com/doc/mysql/en/control-flow-functions.html