pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter_e@gmx.net>
To: ing.marco.colombo@gmail.com
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #12088: pg_upgrade 9.3 -> 9.4rc1 - implicit cast not ported
Date: Tue, 13 Jan 2015 13:41:02 -0500
Message-ID: <54B566BE.6030309@gmx.net> (raw)
In-Reply-To: <20141128082816.5720.15278@wrigleys.postgresql.org>
References: <20141128082816.5720.15278@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 11/28/14 3:28 AM, ing.marco.colombo@gmail.com wrote:
> Hi, we have defined some implicit cast in the schema. After pg_upgrade
> process, these have been dropped and we had to create them again. 
> 
> Cast are defined as:
> 
> create cast (varchar as numeric) with inout as implicit;
> 
> create cast (unknown as numeric) with inout as implicit;
> 
> create cast (unknown as text) with inout as implicit;
> 
> create cast (unknown as integer) with inout as implicit; 

pg_dump doesn't dump these casts.  There is a source code comment that
explains why:

    /*
     * As per discussion we dump casts if one or more of the underlying
     * objects (the conversion function and the two data types) are not
     * builtin AND if all of the non-builtin objects are included in the
dump.
     * Builtin meaning, the namespace name does not start with "pg_".
     *
     * However, for a cast that belongs to an extension, we must not use
this
     * heuristic, but just dump the cast iff we're told to (via dobj.dump).
     */

So recreating the casts manually after the upgrade is the best
workaround at the moment.



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (5+ messages)  latest in thread

Message-ID: <54B566BE.6030309@gmx.net>
Permalink:  ../54B566BE.6030309@gmx.net/
Also on:    postgresql.org/message-id/54B566BE.6030309@gmx.net

 · 

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-bugs@postgresql.org
  Cc: peter_e@gmx.net, ing.marco.colombo@gmail.com
  Subject: Re: BUG #12088: pg_upgrade 9.3 -> 9.4rc1 - implicit cast not ported
  In-Reply-To: <54B566BE.6030309@gmx.net>
  References: <20141128082816.5720.15278@wrigleys.postgresql.org> <54B566BE.6030309@gmx.net>

* 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