0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

phpPgAdminをPostgreSQL 16でちょっと動くようにする方法

Last updated at Posted at 2025-02-05

有志が対応版を作ってくれている様子

代わりに admier.php を使うのが手っ取り早いかも

PostgreSQL の場合は localhost:5432 を指定するひつようg

1.png

手で修正する場合

対応

diff --git a/classes/database/Connection.php b/classes/database/Connection.php
index eb22cd2..c9636b8 100644
--- a/classes/database/Connection.php
+++ b/classes/database/Connection.php
@@ -79,6 +79,7 @@ class Connection {
             case '10': return 'Postgres10';break;
             case '11': return 'Postgres11';break;
             case '12': return 'Postgres';break;
+            case '16': return 'Postgres16';break;
         }

                switch (substr($version,0,3)) {
diff --git a/classes/database/Postgres.php b/classes/database/Postgres.php
index ee19990..a73aca0 100644
--- a/classes/database/Postgres.php
+++ b/classes/database/Postgres.php
@@ -11,7 +11,7 @@ include_once('./classes/database/ADODB_base.php');

 class Postgres extends ADODB_base {

-       var $major_version = 12;
+       var $major_version = 16;
        // Max object name length
        var $_maxNameLen = 63;
        // Store the current schema
  • classes/database/Postgres16.php を新規作成
<?php

/**
 * PostgreSQL 16 support
 *
 */

include_once('./classes/database/Postgres.php');

class Postgres16 extends Postgres {

        var $major_version = 16;

        /**
         * Constructor
         * @param $conn The database connection
         */
        function Postgres16($conn) {
                $this->Postgres($conn);
        }

        // Help functions

        function getHelpPages() {
                include_once('./help/PostgresDoc16.php');
                return $this->help_page;
        }

}
?>
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?