#423 pg_tablespace.spclocation column removed in 9.2

5.0.3
closed-fixed
None
5
2014-08-18
2012-09-20
Dante Lopez
No

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

Discussion

  • 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.

     
    • assigned_to: nobody --> ioguix
    • status: open --> closed-fixed
     
  • Peter Hfer
    Peter Hfer
    2012-10-06

    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

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here


    Anonymous
    2012-10-25

    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.

     
  • Ryan Schmidt
    Ryan Schmidt
    2012-12-03

    Please release a stable version of phpPgAdmin containing this fix.