From 506929c586724aaa5d28f4260078ad2c4e2e9a79 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Wed, 17 Aug 2022 21:20:34 +0200 Subject: [PATCH] fix: Make views pk and fk schema query compatible with postgres v15 --- CHANGELOG.md | 1 + src/PostgREST/DbStructure.hs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ffbf741f8..12f1218de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -66,6 +66,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - #2342, Fix inaccurate result count when an inner embed was selected after a normal embed in the query string - @laurenceisla - #2376, OPTIONS requests no longer start an empty database transaction - @steve-chavez - #2395, Allow using columns with dollar sign($) without double quoting in filters and `select` - @steve-chavez + - #2410, Fix loop crash error on startup in Postgres 15 beta 2. Log: "UNION types \"char\" and text cannot be matched". - @yevon ### Changed diff --git a/src/PostgREST/DbStructure.hs b/src/PostgREST/DbStructure.hs index 6a2a5b583..3d69a584c 100644 --- a/src/PostgREST/DbStructure.hs +++ b/src/PostgREST/DbStructure.hs @@ -656,7 +656,7 @@ allViewsKeyDependencies = pks_fks as ( -- pk + fk referencing col select - contype, + contype::text as contype, conname, conrelid as resorigtbl, unnest(conkey) as resorigcol