phpPgAdmin 5.0.3 (PHP 5.4.6-2~precise+1)
Can't create database/table/schema on the current build if used with Postgres 9.2. Refer to this mailing list issues:
http://archives.postgresql.org/pgsql-bugs/2012-06/msg00203.php
http://archives.postgresql.org/pgsql-bugs/2012-06/msg00202.php
http://archives.postgresql.org/pgsql-bugs/2012-06/msg00201.php
http://archives.postgresql.org/pgadmin-hackers/2012-04/msg00045.php
SQL error:
ERROR: column "spclocation" does not exist
LINE 1: ...pg_catalog.pg_get_userbyid(spcowner) AS spcowner, spclocatio...
^
In statement:
SELECT spcname, pg_catalog.pg_get_userbyid(spcowner) AS spcowner, spclocation,
(SELECT description FROM pg_catalog.pg_shdescription pd WHERE pg_tablespace.oid=pd.objoid) AS spccomment
FROM pg_catalog.pg_tablespace WHERE spcname NOT LIKE $$pg\_%$$ ORDER BY spcname
Hello,
phpPgAdmin 5.0 is officialy not compatible with pg 9.2.
This regression has been fixed in our current development branch of phpPgAdmin. The next release of phpPgAdmin should be released soon.
Thank you for your bug report.
Quick Fix: (worked with my Version (5.0.3) / pg 9.2.1 )
1) change to /classes/database
2) copy "Postgres84.php" to "Postgres92.php"
3) open Connection.php
4) add a line
case '9.2': return 'Postgres92'; break;
at // Detect version and choose appropriate database driver - switch
5) open "Postgres.php" & copy functions "getTablespaces" + "getTablespace"
6) open "Postgres92.php" paste functions into the class
7) replace ", spclocation," with ", pg_tablespace_location(oid) as spclocation," in both functions
regards
Peter
...Or just download the snapshot of the current dev branch:
https://github.com/phppgadmin/phppgadmin/zipball/master
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
peterireds,
You missed one thing.
Change in Postgres92.php
FROM:
class Postgres84 extends Postgres {
var $major_version = 8.4;
TO:
class Postgres92 extends Postgres {
var $major_version = 9.2;
It completes the fix.
Cesar
Guys,
You should use the latest snpashot of PPA instead of patching it.
Please release a stable version of phpPgAdmin containing this fix.
Look at this great solution
https://www.developpez.net/forums/d1304918/bases-donnees/postgresql/installation/probleme-apres-installation-postgresql-9-2-2-a/
File : Postgres.php (you can find this file by command find, generally it exists in : /usr/share/phpPgAdmin/classes/database)
in line : 6983
you edit the classe by this code :
the same for the nexte classe