question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PostgreSQL 12 compatibility (lack of consrc)

See original GitHub issue

Issue type: [x] bug report [x] feature request

Database system/driver: [x] postgres

TypeORM version: [x] latest [x] @next

Steps to reproduce or a small repository showing the problem: PostgreSQL 12 removes the pg_constraint.consrc column. This makes constraintsSql from loadTables in PostgresQueryRunner.ts fail with an exception and aborting the transaction. Documentation:

The docs for 11 still include consrc, but recommend to use pg_get_constraintdef, which only seems to be used for exclusions constraints (x) here. This has been introduced in #2710 for exclusions constraints. It seems that expression is used in some places, but giving it a very rough look I think whatever pg_get_constraintdef returns might work as well. Always using pg_get_constraintdef at least gets my 1 entity test running, but this obviously does not use many constraints.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:25
  • Comments:20

github_iconTop GitHub Comments

53reactions
viktor-kucommented, Sep 28, 2019

@Kononnable I see that it’s fixed in the fork of typeorm. Will it be fixed also in the main typeorm (this) repo some day?

30reactions
zishecommented, Dec 5, 2019

It works in 0.2.21! Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation: 12: E.14. Release 12 - PostgreSQL
Version 12 contains a number of changes that may affect compatibility with previous releases. Observe the following incompatibilities:.
Read more >
PostgreSQL 12 build against trunk is broken - pg_constraint ...
PostgreSQL 12 build against trunk is broken - pg_constraint.consrc was removed ... ERROR: column s.consrc does not exist LINE 3: SELECT ...
Read more >
Postgres Release Notes - All Versions - Bucardo
This is a complete, one-page listing of changes across all Postgres versions. All versions 10 and older are EOL (end of life) and...
Read more >
Security fixes - Why upgrade PostgreSQL?
Lack of these dependencies could allow a column or data type DROP to go ... These functions are stated to be Oracle® compatible,...
Read more >
The jOOQ Release Note History
#9670, Make slf4j-api version backwards compatible to OSGi ... #9331, Postgres 12 exception in code generation output: "column c.consrc does ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found