Moodle-latest and PostgreSQL

Moodle-latest and PostgreSQL

by Ulrik Petersen -
Number of replies: 2
Hello,

I am using PostgreSQL 7.3.4 in a Solaris environment. I had some problems with the latest download of moodle-latest (downloaded today, 2/18-2004 around 8pm GMT+0100). The attached patch fixes these.

The main problem is that PostgreSQL does not support "unsigned" for integers. I have made some crude attempts at fixing this. Possibly the number of bits have to be changed as well to reflect that PostgreSQL takes everything to be signed. There was also a problem in the glossary module's db/postgres7.sql file about a SERIAL that had a prefixed int4, which is not allowed in PostgreSQL.

Note also that I have made a very crude attempt at making db/postgres7.php and db/postgres7.sql for the lesson module. I didn't really know what I was doing, so please take this with a grain of salt.

I was upgrading from version 1.0.9, and with my patches, the upgrade went fine.

Cheers,

Ulrik
Average of ratings: -
In reply to Ulrik Petersen

Re: Moodle-latest and PostgreSQL

by Petri Asikainen -
Hi!
Thanks for patches.
I committed my version of lesson/postgres7 files to CVS before I read your mail.  ( quick'n'dirty versions, but installed well. )


About signed table colums, table_column-fuction does not handle signed-attribute at all for postgresql (look at lib/datalib.php) . So changes to postgres7.php files should not be needed.
(I have tested upgrade from 1.0.9 to current with Solaris 8, php 4.3.4 , postgresql 7.4 and it went well)

Could you tell me what kind of errors did you have? There could be some other issues not find yet...

Cheers,
Petri

In reply to Petri Asikainen

Re: Moodle-latest and PostgreSQL

by Ulrik Petersen -
The errors were of two kinds:

- unsigned
- int4 serial

Maybe both were confined to mod/glossary/db/postgres7.sql.  Certainly I found both kinds of errors in that file.

Cheers,

Ulrik