View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004871 | mantisbt | sql | public | 2004-11-18 04:48 | 2005-04-18 10:26 |
Reporter | gizmo | Assigned To | grangeway | ||
Priority | normal | Severity | feature | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | All | OS | All | OS Version | All |
Product Version | 0.19.1 | ||||
Summary | 0004871: New SQL script for PostgreSQL port | ||||
Description | The actual version of pgSQL script has some fileds and table missing or incompatible. So i decide to convert the actual MySQL script into a compatible PgSQL one. The proposed new version is a bit tricky because the creation of a user add "any" value in some integer type, so I convert them into varchar(3), but it seems to works fine. A next step would be to add integrity constraint but as I didn't look the entire php code, I'm not sure it would cause trouble for the moment. | ||||
Steps To Reproduce | To use this new script, simply use psql to load it into your PgSQL database and add $g_db_typ = 'pgsql'; to your confing_inc.php file. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
More information about connections: To quickly bypass this problem, change the connection variables like this: In the host, place the classical pgsql connection string (host=... port=... dbname=... user=... password=...) Then, in the core/database_api.php file, find the db_connect function and change is call to "Connect($p_hostname, $p_username, $p_password, $g_database_name );" into "Connect($p_hostname);" I know this is dirty, but if you're in a hurry, it works... |
|
Bug fix: I didn't notice that when a user preference is unchecked, the empty string is send as an update for the integer, which is unable for PostgreSQL, so I make a fix in the second attachement file converting all the guilty integer fields into varchar fields. |
|
You should use INT's not varchar(3). Latest CVS version of mantis fixes the user_pref's to supply 0 for any instead of 'any' This is for exactly the same reason you hit - mysql 'supports' any meaning 0. Paul |
|
regarding, the other point: What's wrong with just setting in the config: Paul |
|
I didn't choose CVS version cause the tracker must be use in production and my chief does only accept official release for this. Anyway, 'any' values are not the only "false" values accept by mysql. mysql also accept empty string as an integer, what is done when you uncheck some user preference. PostgreSQL don't. So, until mantis doesn't convert empty string to default integer value, postgresql will refuse to update the mantis_user_pref_table. For the second point, if you simply update the g_hostname string without chaging signature of the Connect function, the others argument seems to be taken in account and it result in the fact that the connection failed. I try this first, but it didn't work until I update the call to the function. regards, |
|
Both the mssql.sql and pgsql.sql are out of date. For the next release, i'm hoping to get an adodb data dict schema defined which will generate the mssql/pgsql tables. As adodb's datadict is generic, this means that we won't have to keep multiple schema files in check. It also means that it may be possible to use other db's that are supported by adodb's datadict with mantis. If this functionality goes into the next release, the mssql/pgsql.sql files will become redundant. Notes:
I'm going to use issue 0005289 to track the datadict stuff, so closing this issue now. |
|