Issue status update for http://drupal.org/node/26091 Post a follow up: http://drupal.org/project/comments/add/26091 Project: Drupal Version: cvs Component: postgresql database Category: tasks Priority: normal Assigned to: Anonymous Reported by: Smirnov Updated by: Dries Status: patch Waiting for a review from Adrian. I don't have a PostgreSQL setup. Dries Previous comments: ------------------------------------------------------------------------ June 30, 2005 - 18: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 [1]. 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? [1] http://dev.mysql.com/doc/mysql/en/control-flow-functions.html ------------------------------------------------------------------------ June 30, 2005 - 18:33 : Smirnov Attachment: http://drupal.org/files/issues/INSTALL.txt.patch (removes plpgsql) (594 bytes) If this issue to add installation instructions for PG [2] gets approved and committed then please use this patch to update /INSTALL.txt/ so that it no longer mentions plpgsql. [2] http://drupal.org/node/25792