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

huangapple go评论67阅读模式
英文:

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 dockerized stack.

我目前正在尝试将旧的PHP项目迁移到一个容器化的堆栈中。

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

我创建了3个服务,使用了postgres:10.21,dpage/pgadmin4和adminer镜像:

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

When I use adminer, I don't have any problem listing the database data, but when I use pgadmin 4 with postgres 10, I get this error:

当我使用adminer时,列出数据库数据没有任何问题,但当我使用pgadmin 4与postgres 10时,我收到以下错误:

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?

我该如何修复这个错误?

英文:

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 ?

答案1

得分: 4

已从pgadmin4 7.4升级到7.5¹并使其再次正常工作。

Pgadmin4 v7.5于2023年7月27日发布。


从pgadmin4 7.4¹降级到7.3²以前,并使其再次正常工作。

另请参阅https://stackoverflow.com/a/76620309/5540231。

英文:

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

huangapple
  • 本文由 发表于 2023年7月3日 05:43:39
  • 转载请务必保留本文链接:https://go.coder-hub.com/76600915.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定