[drupal-devel] [task] Add pgsql version checking to updates.inc

Cvbge drupal-devel at drupal.org
Fri Aug 19 14:33:36 UTC 2005


Issue status update for 
http://drupal.org/node/29082
Post a follow up: 
http://drupal.org/project/comments/add/29082

 Project:      Drupal
 Version:      cvs
 Component:    postgresql database
 Category:     tasks
 Priority:     normal
 Assigned to:  Cvbge
 Reported by:  Cvbge
 Updated by:   Cvbge
-Status:       patch (code needs work)
+Status:       patch (code needs review)
 Attachment:   http://drupal.org/files/issues/drupal_pg_version_and_other.diff (2.76 KB)

Added 2 new functions to add or change column definition. The take care
about mysql/pgsql. Code not tested, will test and update old code when
I hear that this has a chanse to go in ;)




Cvbge



Previous comments:
------------------------------------------------------------------------

Wed, 17 Aug 2005 21:25:43 +0000 : Cvbge

Postgres, since 6.4, has version() function so you can check db version
from SQL. This can be used in updates.inc for example for conditional
dropping of the column (which is available since 7.3, not 7.4 as stated
in updates.inc).
I need to check how the version string is returned in different
versions before making changes.




------------------------------------------------------------------------

Thu, 18 Aug 2005 10:08:25 +0000 : Cvbge

Attachment: http://drupal.org/files/issues/drupal_pg_version2.diff (1.01 KB)

Here's a function returning postgres db version. I'm not sure if it fits
in updates.inc, maybe it should be somewhere else.







More information about the drupal-devel mailing list