phppostgresqldockerpgadminadminer

PGAdmin 4 error: missing FROM-clause entry for table 'rel' when displaying table data in PostgreSQL 10, but not encountered with Adminer


I'm currently trying to migrate an old PHP project to a dockrized stack .

I created 3 services using postgres:10.21 , dpage/pgadmin4 and adminer images :

   postgresql:
    container_name: ${PROJECT_NAME}-postgresql
    build:
      context: './.docker/postgres'
    restart: on-failure
    environment:
      POSTGRES_USER: ****
      POSTGRES_PASSWORD: ****
      POSTGRES_DB: ****
      POSTGRES_INITDB_ARGS: "--encoding=UTF-8"  //  UTF encode
    ports:
      - "${POSTGRES_PORT}:5432"
    volumes:
      - ./.docker/postgres/groomrhv2_dev_2023-06-28.dump:/docker-entrypoint-initdb.d/groomrhv2_dev_2023-06-28.dump
      - ./.docker/postgres/local_pgdata:/var/lib/postgresql/data


  pgadmin:
    build:
      context: './.docker/pgadmin'
    depends_on:
      - postgresql
    container_name: ${PROJECT_NAME}-pgadmin4
    restart: on-failure
    ports:
      - "${PGADMIN_PORT}:80"
    environment:
      PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
      PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
    volumes:
      - ./.docker/pgadmin/pgadmin-data:/var/lib/pgadmin


  adminer:
    image: adminer
    container_name: ${PROJECT_NAME}-adminer
    restart: unless-stopped
    environment:
      ADMINER_DEFAULT_SERVER: postgresql
    ports:
      - "${ADMINER_PORT}:8080"
    command: php -S 0.0.0.0:8080 -t /var/www/html
    #depends_on:
    #- postgresql

When i use adminer i don't have any problem to list the database data, but when i use pgadmin 4 whith postgres 10 i got this error :

missing FROM-clause entry for table "rel" LINE 8: ...ER JOIN pg_catalog.pg_constraint con ON con.conrelid=rel.oid

How can i fix this error ?


Solution

  • Upgraded from pgadmin4 7.4 to 7.5¹ and got it working again.

    Pgadmin4 v7.5 was released on July 27, 2023.


    Downgraded from pgadmin4 7.4¹ to 7.3² previously and got it working again.

    See also https://stackoverflow.com/a/76620309/5540231