summaryrefslogtreecommitdiff
path: root/drivers/adodb-postgres7.inc.php
AgeCommit message (Collapse)AuthorFilesLines
2022-05-06pgsql: remove is_resource() checks (PHP 8.1 compat)ReimuHakurei1-1/+1
Affected_Rows() always returns false on PHP 8.1, because the 'pgsql result' resource has been replaced by the PgSql\Result class [1]. Changes to original contribution: * Adjust PHPDoc for ADODB_postgres64::$_resultid * Fix one more occurrence in the postgres7 driver Fixes #833 [1]: https://www.php.net/manual/en/class.pgsql-result.php Co-authored-by: Damien Regad <dregad@mantisbt.org> (cherry picked from commit e3287d6be5545634a6ccbf868919028991a68791)
2021-11-08Merge _fixblobs() into _prepFields()Damien Regad1-3/+9
Following up on #767, per @Unifex's suggestion [1], removing _fixblobs() and moving its code into new _prepFields() function. Additional changes: - add PHPDoc block - protected attribute - remove return type - not really useful as in most cases success is evaluated by checking $this->fields !== false - fixed a couple remaining occurrences of is_array() checks - coding guidelines [1]: https://github.com/ADOdb/ADOdb/pull/760#issuecomment-961564909
2021-11-08Refactored ADODB_postgres7::_fixblobs() Gold1-21/+6
The call to pg_fetch_array() returns false in all cases where we would not need or want to potentially _fixblobs() and return true. A straight up boolean check is all that is needed here, no need for in_array(). Tracking through _fixblobs() is called in a number of places and how its result is checked was repeated in every case. The checks were moved into the function, which was updated to return a boolean should we want to check that. It was also noted that in every case the setting of $this->fields was identical as well so new _prepfields() method was added which sets $this->fields and calls _fixblobs(). All instances of _fixblobs() were replaced with _prepfields() and the pg_fetch_array() call deleted. Fixes #767 (replacing #760)
2021-11-07Refactor ADODB_postgres7::metaForeignKeys() case conversionDamien Regad1-3/+6
2021-11-07Uniformize metaForeignKeys() function signatureDamien Regad1-4/+1
- public visibility - camelCase - change $owner default from false to '' - add $associative param where missing - PHPDoc updates
2021-11-07Removed ADODB_postgres7::_old_MetaForeignKeys()Damien Regad1-35/+0
Method is not used anywhere.
2021-11-07Whitespace, coding guidelines, PHPdocDamien Regad1-1/+1
2021-08-17Redo Merge branch 'hotfix/5.21' Standardized file headersDamien Regad1-13/+19
Try to do it right this time... # Conflicts: # adodb-memcache.lib.inc.php Fixes #751
2021-08-17Reset version to avoid merge conflictsDamien Regad1-1/+1
Fixes #751
2021-08-17Revert changes since Standardized file headers mergeDamien Regad1-19/+13
The conflicts resolution applied when merging the Standardized file headers (commit e9dcce3df24912ad869d0193f0b419f2309101fc) was seriously messed up, actually overwriting a number of changes in the master branch. Rather than trying to go and fix things one by one which has a high risk of messing things further, it's easier to redo the merge from a clean slate, so this commit reverts the following: - "Merge branch 'hotfix/5.21' Standardized file headers", e9dcce3df24912ad869d0193f0b419f2309101fc - "Merge tag 'v5.21.1'", 5f437df3104159d5d659f60e31bef8d33c34995f - "Reset version to 5.22.0-dev" af9234a525c3255af051a330164486d73be4c63a - "Fix incorrect resolution of merge conflicts" a6733f61b0165b366c8d2c70d9af82edc3881951. - "Fix syntax error in toexport.inc.php" 20b01e83cb61b6b2460f64c7d1277c5f4cc28574. Fixes #751
2021-08-14Standard file header: /driversDamien Regad1-13/+19
2021-03-08Bump version to 5.21.1-devDamien Regad1-1/+1
2021-03-08Refactoring getCharSet and setCharSetDamien Regad1-6/+0
Simplify the code in mysqli and postgres7 drivers, and get rid of unnecessary `@` error suppresion.
2021-03-08get/setCharSet: avoid TypeError when no connectionDamien Regad1-1/+3
On mysqli, PHP 8 throws an 'Uncaught TypeError: method_exists(): Argument 1 ($object_or_class) must be of type object|string, bool given'. Checking that _connectionID is set fixes the problem. A similar issue was found and fixed with the postgres7 driver as well. Note that fixing the legacy mysql driver is not necessary, as the driver has been removed in PHP 7, and the error suppression operator should do the job on PHP 5. Fixes #686
2021-03-08get/setCharset: camelCase, PHPDoc, param consistencyDamien Regad1-17/+34
2021-02-27Bump version to 5.21.0v5.21.0Damien Regad1-1/+1
2021-02-02Bump version to 5.21.0-rc.1v5.21.0-rc.1Damien Regad1-1/+1
2020-12-20Bump version to 5.21.0-beta.1v5.21.0-beta.1Damien Regad1-1/+1
2020-01-24Removed PHP5.1 check in ADODB_postgres7::_construct()Mark Newnham1-1/+1
2018-03-30Merge branch 'hotfix/5.20'Damien Regad1-0/+2
I messed up the merge at c350c007ed585a4da4dc8c62ae7954cfe13b621f. Not sure what I did or how, but the changes from the hotfix branch got lost. Redoing the merge to fix the problem.
2018-03-30Fix potential SQL injection in SelectLimit()Dave Paul1-0/+2
The `SelectLimit` function has a potential SQL injection vulnerability through the use of the `nrows` and `offset` parameters which are not forced to integers. This is a follow-up on #311, and fixes all remaining drivers that do not use ADOConnection::SelectLimit(). Fixes #401 Signed-off-by: Damien Regad <dregad@mantisbt.org> Original commits squashed, message reworded. Fixed whitespace.
2018-03-08Bump version to 5.20.10v5.20.10Damien Regad1-1/+1
2016-12-21Bump version to 5.20.9v5.20.9Damien Regad1-1/+1
2016-12-17Bump version to 5.20.8v5.20.8Damien Regad1-1/+1
2016-09-20Bump version to 5.20.7v5.20.7Damien Regad1-1/+1
2016-09-20Update changelogDamien Regad1-1/+1
2016-08-31Bump version to 5.20.6v5.20.6Damien Regad1-1/+1
2016-08-10Bump version to 5.20.5v5.20.5Damien Regad1-1/+1
2016-03-30Bump version to 5.20.4Damien Regad1-1/+1
2016-01-02Update version 5.21.0-dev release year to 2016Damien Regad1-1/+1
2016-01-01Bump version to 5.20.3v5.20.3Damien Regad1-1/+1
2015-12-27Update version to avoid merge conflictsDamien Regad1-1/+1
2015-12-27Bump version to 5.20.2v5.20.2Damien Regad1-1/+1
2015-12-16Remove useless constructorsDamien Regad1-11/+0
Fixes #171
2015-12-06Bump version to 5.20.1v5.20.1Damien Regad1-1/+1
2015-11-28Bump version to 5.21devDamien Regad1-1/+1
2015-11-28Bump version to 5.20.0v5.20.0Damien Regad1-1/+1
2015-11-26Adjust header comment blocksDamien Regad1-1/+3
- running SED script - manual adjustments for files not processed by regex
2015-06-25Move _updatefields() method to ADORecordSetDamien Regad1-23/+0
Currently, this method only exists in postgres7, oci8 and derived drivers. Moving it to the base class will enable reuse by other drivers that need the functionality.
2015-06-25New method ADORecordSet::AssocCaseConvertFunction()Damien Regad1-9/+12
- Avoid code duplication - optimize ADORecordSet_assoc_postgres7::_updatefields()
2015-05-15Use ADODB_ASSOC_CASE_xxx constantsDamien Regad1-1/+1
2015-05-15Coding guidelines and whitespaceDamien Regad1-1/+2
2014-09-09pgsql: Stop using legacy function aliasesMikeB1-2/+2
Use proper PostgreSQL function names rather than legacy aliases that arent documented anymore. This should continue to work back to PHP v4.2 still, and also works with HHVM. Signed-off-by: Damien Regad <dregad@mantisbt.org>
2014-05-12postgres7: fix system warning in MetaColumns() with schemaDamien Regad1-1/+17
When calling MetaColumns with schema.table, the driver triggers a 'Warning: sprintf(): Too few arguments' because the metaColumnsSQL1 statement contains one more parameter in 7 compared to the 6.4 version. Resolved by adding a new protected _generateMetaColumnsSQL() method to handle the preparation of the appropriate SQL statement, and overriding it in the postgres7 driver. http://phplens.com/lens/lensforum/msgs.php?id=19481
2014-04-30Add phpDocDamien Regad1-0/+3
2014-04-30Simplify SQL in postgres7 MetaForeignKeysDamien Regad1-41/+22
The original SQL from William Kolodny [William.Kolodny#gt-t.net] was very complex with multiple sub-select statements. Through use of regexp_replace() instead of split_part(), we now have only a single subquery. Removed obsolete comment.
2014-04-30Reformat SQL statementsDamien Regad1-81/+117
2014-04-30WhitespaceDamien Regad1-40/+40
2014-04-30Bump version to 5.20devDamien Regad1-1/+1
2014-04-23Bump version to 5.19v5.19Damien Regad1-1/+1