summaryrefslogtreecommitdiff
path: root/classes/database
AgeCommit message (Collapse)Author
2021-02-17Restore support for PgSQL 9.4 and belowHEADmasterSloane Bernstein
The addition of support for PostgreSQL 9.6 and above neglected to change the `Postgres94` class to inherit from `Postgres95` instead of the latest `Postgres` class. This change restores the chain of inheritance, so that `Postgres94` and classes below see overridden methods from `Postgres95` and above.
2020-10-28Consider group membership when testing owned_onlyRobert Treat
Based on code and suggestions from @cathysax, ultimately I used the internal pg_has_role function to test whether a user has ownership rights based on group membership. I actually check for 'USAGE' rights, since that implies the role has rights without need to `set role`, which users wouldn't be able to do with a normal PPA login. Loosely tested back to 9.5. This fixes https://github.com/phppgadmin/phppgadmin/issues/102
2020-10-09Fix links to docs for pgsql 13 & 14Robert Treat
For version 14, we point to the /devel/ docs, since that version is currently in dev. I also bumped the fall through to point to v14, arguably we could instead point to /current/, but any current version will work, so I think devel is more likely.
2020-10-07Add support for Postgres 13,14devRobert Treat
2019-12-08Clean up OID handling changesRobert Treat
This is mostly just refactoring Nirgals patch to use a standard capability function. I also short-circuited default_with_oid check since it will always show false in >=PG12, so this saves a round trip. This also adds a comment in the config file that show oids is no longer supported. This could lead to a slight difference in running instalations, but since it does not affect any code/behavior, not going to bump the config version.
2019-12-08Disable OID handling on PG12Jean-Michel Vourgère
Notes: - "CREATE TABLE WITHOUT OIDS" continues to work, for now - "SHOW default_with_oids" continues to work, for now
2019-12-07privilege - missing USAGE on sequencesoleuu
2019-11-07codespell assisted typo cleaningJean-Michel Vourgère
2019-10-31Grammer fixes noticed during spelling fixes reviewRobert Treat
2019-10-31codespell assisted typo cleaningJean-Michel Vourgère
2019-09-24Overhaul sequence properties page to better handle different permissions.Robert Treat
Whilst fixing the sequence group viewing bug, noticed that sequence properties in general would throw an error if you did not have appropriate permissions. While this is similar to permission denied errors when looking directly at a sequence, there is other information to be exposed which is accesible through pg_sequence and pg_sequences. The change implements a method for determining if a user can access the sequence directly (ie. select * from seq) and if so, include that information in the output. If not, we null those columns. This also fixes cases where last_value information is not visible due to a sequence not haveing been "read" yet. ie. after sequence creation, or anytime a sequence is altered, and nextval/setval hasn't been called. This problem seems to go back to at least postgres 9, so I've mainlined the fix. It might break on older unsupported versions of postgres; if someone wants to fix that well... patches welcome.
2019-09-22Fix for SF BUG #470 Can't list/see/edit sequences owned by groupRobert Treat
While I have implemented this fix against Postgres 12, as far as I can tell, this bug existed since 7.x, so I'm adding it to all versions back to 7.4 (when we did the class re-org). This could probably use more testing on older versions though. Thanks to Carlos Martinez for the bug report and reproducible test case!
2019-07-20Fix bug with partial SQL execution failure.Robert Treat
Fix based on patches from @nirgal and @LuckySB Reported at: https://sourceforge.net/p/phppgadmin/bugs/448/ https://bugs.debian.org/762378 https://github.com/phppgadmin/phppgadmin/pull/27 https://github.com/phppgadmin/phppgadmin/pull/30
2019-07-20Change perms exec bitJean-Michel Nirgal Vourgère
chmod -x all php files without a #! chmod +x those with one.
2019-07-19PG11 changes pg_proc.proisagg to prokind to support stored procedures andRobert Treat
window functions, breaking functions, aggregates, and object look-up within PPA. This commit fixes all three of these areas. In theory we should probably add some display bits to help users differentiate between these different types in the UI, but this at least makes the system work again. Thanks to @decodeJarvis who initially reported the problem and provided a proposed fix (see PR#24 on the xzilla repo). Since we needed a more comprehensive fix, I didn't use the code, but his patch was useful for getting started.
2019-07-17php-7.2 fix - 'each' has been deprecatedSjon Hortensius
2019-06-28At last, the long awaited patch for php7 support.Robert Treat
This commit is focused strictly on the class/constructor changes. This has primarily been tested on php 7.1 and postgres 11, with all tests passing though there are some spurious warnings; I have fixes for them but will add them in seperate commits. Note that the code here is my own, but I did look at patches from @gabrielhomsi and @w1ldzer0 for some sanity checking. Any bugs or missing items are on me.
2018-10-27Add support for Postgres 9.6, 10, 11, and 12. Verify tests passing on all ↵Robert Treat
supported versions.
2016-08-12Explicit Support for PG 9.5John K. Harvey
2015-02-01Explicit Support for PG 9.4Robert Treat
2015-02-01Make json and jsonb data types display as textarea rather than 1 line input ↵Robert Treat
fields. Inspired by patch from Felipe Figueroa <amenadiel@gmail.com>
2014-03-04Convert spaces back to tabs introduced in 8ebf7562291f for email readability.Szabolcs Hubai
2014-03-02minor cleanup; be consistent in lowercasing PHP keywordsRobert Treat
2014-03-02Improve support for handling IN / named params in functionsRobert Treat
Based on work by Bert Thomas <bthomas@brothom.nl>
2013-11-11Fix XSS on bytea, reported by basteln3rk on sf.netJehan-Guillaume de Rorthais
See discussion on bug #441: http://sourceforge.net/p/phppgadmin/bugs/441/
2013-05-28Have PG > 8.1 && <= 9.1 reporting waiting processes on process page.Karl O. Pinc
2013-05-24Make process screen report information in a way that makes sense in postgres 9.2Robert Treat
Also add in the waiting option, making it work back to at least 8.1
2013-05-24Add support for user-sent signals. (9.2+)Karl O. Pinc
2013-05-24Processes: Fix <= 9.1 to show only db related processes & clean dbname.Karl O. Pinc
Fix bugs introduced in commit d571ecae7b by ioguix on 2012-09-21. I can't tell why these changes crept in along with the rest of the fixes in that commit. It looks like a testing version was committed.
2013-05-18Explicit support for PG 9.3.Karl O. Pinc
2013-03-26Fix incorrect modification of bytea data when updating rows that contain ↵Robert Treat
bytea columns. Based on the POC patch from ioguix. This fixes SF Bug # 3243916.
2012-11-27Fix queries reading pg_shdescriptionMagnus Hagander
These queries need to be classoid qualified, so they work when there are multiple objects with the same oid but of different classes. (Which can always happen, but is a lot more likely to happen after a cluster has been pg_upgrade'd)
2012-11-23don't try and escape nulls, which leads to dangling x values. fixes ↵Robert Treat
Sourceforge Bug ID: 3579602.
2012-11-04Fixes PHP 5.4 Strict errorsJehan-Guillaume (ioguix) de Rorthais
2012-09-23Fix autovacuum add/edit with 8.1Jehan-Guillaume (ioguix) de Rorthais
Autovacuum under 8.1 doesn't has vacuum_freeze_min_age and autovacuum_freeze_max_age.
2012-09-21Fix bug with getProcesses with 9.2Jehan-Guillaume (ioguix) de Rorthais
2012-09-17Fix bug where new autovacuum setup for a table was failingJehan-Guillaume (ioguix) de Rorthais
Fix a bug INSERT SQL that was using 'WHERE' (?!)
2012-08-24Fix on the processes page with 9.2Jehan-Guillaume (ioguix) de Rorthais
Field pg_catalog.pg_stat_activity.procpid is renamed as pid in 9.2
2012-08-22Remove old plugin architecture.Leonardo Sapiras
Patch by Leonardo Sapiras, remerged by ioguix. * remove old plugin architecture * remove plugin Slony
2012-06-04update tablespace support to handle 9.2 changesRobert Treat
2012-05-29stub support for postgres92, clean up some other version bits.Robert Treat
passes tests for 90,91,92(ish)
2012-05-29Intermediate support for Postgres 90/91Robert Treat
2012-02-23Fix bug where renaming a tablespace was leading to an errorJehan-Guillaume (ioguix) de Rorthais
When renaming a tablespace, it was renamed first, then a comment was set on its old name in the same xact, leading to an error and rollback.
2011-12-30Makes phpPgAdmin core full UTF-8 only.Jehan-Guillaume (ioguix) de Rorthais
Translations, db connexions and html pages are now all in UTF-8. In consequence: * we remove everything about recode stuffs * recode all lang/ translation files to UTF-8 * force UTF-8 in htmlentities
2011-06-03Removes useless call of function_exists since we are PHP5+ onlyJehan-Guillaume (ioguix) de Rorthais
2011-06-01remove $username when calling $data->isSuperUser about current connection roleJehan-Guillaume (ioguix) de Rorthais
2011-06-01Fix a bug and support empty username in $data->isSuperUser to check the ↵Jehan-Guillaume (ioguix) de Rorthais
superUser status of the current role Fixed a bug on the way as in previous version it was checking if function pg_parameter_status exists and used it directly, hence testing only the currently used role. pg_parameter_status is available in PHP 5.*
2011-02-12remove several bits of trigger defintion hacks for pre-7.4 servers.xzilla
2010-12-20Fix some methods using nonstandard escaped string in the database access classesGuillaume (ioguix) de Rorthais
2010-12-20Fix bad inheritance between pg83 -> pg instead of pg83 -> pg84 in the ↵Guillaume (ioguix) de Rorthais
database access classes