Using Editor with PostgreSQL

Help
2011-03-30
2013-06-06
  • Nobody/Anonymous

    I see the Editor says it will work with PostgreSQL (ad Adminer does), and I downloaded the first version (not the Editor for MySQL version).  I've created an index.php per the example.  But how do I tell it to use PostgreSQL?

    Thanks

     
  • Anonymous - 2011-04-15

    Documentation is vague, author assumes you can figure it out by yourself. He is presenting it as an alternative to PhpMyAdmin which has been around for years but Adminer does not even come close.

     
  • Jakub Vrána

    Jakub Vrána - 2011-04-17

    Currently, using Adminer Editor with other database systems is little tricky. You have to define own loginForm method specifying the driver. Like this:

    function loginForm() {
        ?>
    <table cellspacing="0">
    <tr><th><?php echo lang('Username'); ?><td><input type="hidden" name="driver" value="pgsql"><input type="hidden" name="server" value="localhost"><input id="username" name="username" value="<?php echo h($_GET["username"]);  ?>">
    <tr><th><?php echo lang('Password'); ?><td><input type="password" name="password">
    </table>
    <?php
        echo "<p><input type='submit' value='" . lang('Login') . "'>\n";
        echo checkbox("permanent", 1, $_COOKIE["adminer_permanent"], lang('Permanent login')) . "\n";
    }
    
     
  • Jakub Vrána

    Jakub Vrána - 2011-04-17

    You would probably also need to create the database method.

     
  • Artem

    Artem - 2017-05-13

    Hello. I tried different methods from different posts, but nothing is working. If you really target end users for Adminer Editor, it would be good to allow users to have an ability to open editor at least. Why the whole website doesn't have at least one Postgres example? Is it so rare database? I see many post here complaining pgsql bad support for editor, but any solution seems to be working.

    I am not php programmer and I don't understand all that "you should implement loginForm". Where should I implement that? In new file? Within "<?php function adminer_object() {..."? Where to call that method?

    "You also need to implement the database() method" — where should I implement that? How to implement that? So many questions because of lacking of one simple working example for Postgres. I very want to try Adminer Editor, but I'm stuck, I spent 2 hours trying to connect Editor to postgre without any luck. Adminer works perfectly, but editor not.

     

Log in to post a comment.