【问题标题】:Sequelize (Nestjs) error connection Postgresql 8.4Sequelize(Nestjs)错误连接Postgresql 8.4
【发布时间】:2021-06-23 00:04:54
【问题描述】:

我在使用 Sequelize 连接 Postgres 8.4 版本时遇到问题。显示一个关于不存在 'pg_range' 的错误(错误消息:relation "pg_range" dows not exist)。

当我在 Postgre 9 中尝试连接时,它可以工作。如何在 Postgres 8.4 中连接?

我使用的技术:

  1. Postgresql v8.4
  2. @nestjs/core v7.5.1
  3. @nestjs/sequelize v0.2.0
  4. sequelize-typescript v0.2.0
  5. 续集 v6.5.0
  6. pg(非阻塞 PostgreSQL 客户端)v8.5.1

错误:

[Nest] 22866   - 03/26/2021, 3:42:41 AM   [SequelizeModule] Unable to connect to the database. Retrying (1)... +85ms
error: no existe la relación «pg_range»
    at Connection.parseE (/.../node_modules/pg/lib/connection.js:567:11)
    at Connection.parseMessage (/.../node_modules/pg/lib/connection.js:391:17)
    at Socket.<anonymous> (/.../node_modules/pg/lib/connection.js:129:22)
    at Socket.emit (events.js:198:13)
    at addChunk (_stream_readable.js:288:12)
    at readableAddChunk (_stream_readable.js:269:11)
    at Socket.Readable.push (_stream_readable.js:224:10)
    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)

【问题讨论】:

  • 恐怕你的 JS 客户端的 PostgreSQL 版本是unsupported

标签: node.js postgresql sequelize.js nestjs pg


【解决方案1】:

在文档中,指出了 pg 的版本,因为 pg_range 存在(9.2) enter link description here

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-01-21
    • 2023-02-12
    • 2013-10-26
    • 1970-01-01
    • 1970-01-01
    • 2019-07-28
    • 2020-07-21
    • 1970-01-01
    相关资源
    最近更新 更多