#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

  • J.Guillaume (ioguix) de Rorthais

    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.

     
  • J.Guillaume (ioguix) de Rorthais

    • 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

     
  • J.Guillaume (ioguix) de Rorthais

    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.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks