pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jasvant Singh <jasingh@watermarkinsights.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Unable to migrate from postgres-13 to 14
Date: Wed, 12 Jan 2022 09:55:30 -0500
Message-ID: <2995239.1641999330@sss.pgh.pa.us> (raw)
In-Reply-To: <CAPGEVuCaGPuybxLjtd0_tL8Ud4j9FFnLQLHhDPxx5sdAO3-pMQ@mail.gmail.com>
References: <CAPGEVuCaGPuybxLjtd0_tL8Ud4j9FFnLQLHhDPxx5sdAO3-pMQ@mail.gmail.com>

Jasvant Singh <jasingh@watermarkinsights.com> writes:
> pg_restore: error: could not execute query: ERROR:  function
> array_append(anyarray, anyelement) does not exist
> Command was: CREATE AGGREGATE "public"."mode"("anyelement") (
>     SFUNC = "array_append",
>     STYPE = "anyarray",
>     INITCOND = '{}',
>     FINALFUNC = "public"."_final_mode"
> );

> To work around this problem I decided to drop this aggregate in postgres-13
> and create it again with the supported version of array_append in
> postgres-14.
> But when I tried to drop it in postgres-13 I got following error:
> #drop aggregate mode("anyelement") CASCADE;
> ERROR:  cannot drop function mode(anyelement) because it is required by the
> database system

I think this is trying to drop the built-in pg_catalog.mode(anyelement)
aggregate.  Say DROP AGGREGATE public.mode("anyelement")

(I'd be pretty cautious about using CASCADE, too, at least till
you've seen what would get dropped.)

			regards, tom lane





view thread (2+ messages)

Message-ID: <2995239.1641999330@sss.pgh.pa.us>
Permalink:  ../2995239.1641999330@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2995239.1641999330@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jasingh@watermarkinsights.com
  Subject: Re: Unable to migrate from postgres-13 to 14
  In-Reply-To: <2995239.1641999330@sss.pgh.pa.us>
  References: <CAPGEVuCaGPuybxLjtd0_tL8Ud4j9FFnLQLHhDPxx5sdAO3-pMQ@mail.gmail.com> <2995239.1641999330@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox