-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Transparent database update support using AXMLS for PostgreSQL #124
Comments
It would be helpful if you could include the reason why the base ChangeTableSQL does not work with PostgreSQL or perhaps some example cases of where it falls down. Its been a while since I used AXMLS, but when I was using it (many years ago), it seemed to work fine on PostgreSQL. |
It produces an error due to syntax. This happens with updating of columns. We think the syntax generated by the default ChangeTableSQL was made to work with as many databases as possible, but the syntax is broken on PostgreSQL. We are working with PostgreSQL 9. We had indication from on line sources that this was always an issue. For example: "http://adodb-xmlschema.sourceforge.net/docs/index.html" and "http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=1756" Notice how the second link has "Status: RESOLVED FIXED" for the bug. We tracked that fixed code, and it still did not work for us. Perhaps we did not use it correctly or tested the wrong code, we do not know. There is also indication in the code notes that older versions of PostgresSQL suffered from limitations that gave rise to the need of copying tables over when altering them. This suggested to us that the general code could not have worked with PostgreSQL when modifying tables. Of course, we could be wrong. What version of PostrgreSQL do you remember AXMLS working for? |
… the file "datadict-postgres.inc.php". This should add transparent database update support when using ADODB AXMLS. Please note the following: The function is not to be confused with a general implementation. Do not be tempted to replace it with the same function in "adodb-datadict.inc.php". The transparent database update for PostgreeSQL has the same limitation that would exist for other databases using ADODB AXMLS. The function only supports PostgreSQL version 8 and up at the moment. No attention has been paid to performance yet when implementing the function. Referencing request "ADOdb#124".
@jahto made this https://github.com/Flyspray/flyspray/blob/master/setup/upgrade/1.0/datadict-postgres.inc.php Don't know if some of the comments there still apply to current postgresql in 2018 (postgresql10 and newer) |
Thank you for the update. I am happy the community is still active. The team itself long moved on, and this account is now my personal account. If you wish me to close this issue, or the community wishes to close it, I do not mind, but I could not tell you whether it was indeed fixed or not. I am still likely to refer to said code in the future, so thank you again. |
It seems that datadict-postgres.inc.php still doesn't have the function changeTableSQL, but it could have been fixed some other way. It will take a while, but I'll check this week if the latest version of ADOdb works. |
This was completed and closed in 5.22.3 by #865 |
OK, I'll add a reference to this issue in the Changelog. |
The library appears to have come a long way, and looking at the code it appears that it should now be possible to implement a custom version of the "ChangeTableSQL" function for the "ADODB2_postgres" class in 'datadict-postgres.inc.php" using similar methodologies used in AlterColumnSQL, and DropColumnSQL. As things are at the moment, transparent database update using the AXMLS feature on PostgreSQL does not work.
The text was updated successfully, but these errors were encountered: