pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #12088: pg_upgrade 9.3 -> 9.4rc1 - implicit cast not ported
5+ messages / 4 participants
[nested] [flat]

* BUG #12088: pg_upgrade 9.3 -> 9.4rc1 - implicit cast not ported
@ 2014-11-28 08:28 ing.marco.colombo@gmail.com
  2014-12-05 12:19 ` Re: BUG #12088: pg_upgrade 9.3 -> 9.4rc1 - implicit cast not ported Bruce Momjian <bruce@momjian.us>
  2015-01-13 18:41 ` Re: BUG #12088: pg_upgrade 9.3 -> 9.4rc1 - implicit cast not ported Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 2 replies; 5+ messages in thread

From: ing.marco.colombo@gmail.com @ 2014-11-28 08:28 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      12088
Logged by:          Marco Colombo
Email address:      ing.marco.colombo@gmail.com
PostgreSQL version: 9.4beta2
Operating system:   Centos 7 64bit
Description:        

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; 


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



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: BUG #12088: pg_upgrade 9.3 -> 9.4rc1 - implicit cast not ported
  2014-11-28 08:28 BUG #12088: pg_upgrade 9.3 -> 9.4rc1 - implicit cast not ported ing.marco.colombo@gmail.com
@ 2014-12-05 12:19 ` Bruce Momjian <bruce@momjian.us>
  2015-01-09 15:53   ` Re: BUG #12088: pg_upgrade 9.3 -> 9.4rc1 - implicit cast not ported Marco Colombo <ing.marco.colombo@gmail.com>
  1 sibling, 1 reply; 5+ messages in thread

From: Bruce Momjian @ 2014-12-05 12:19 UTC (permalink / raw)
  To: ing.marco.colombo@gmail.com; +Cc: pgsql-bugs

On Fri, Nov 28, 2014 at 08:28:16AM +0000, ing.marco.colombo@gmail.com wrote:
> The following bug has been logged on the website:
> 
> Bug reference:      12088
> Logged by:          Marco Colombo
> Email address:      ing.marco.colombo@gmail.com
> PostgreSQL version: 9.4beta2
> Operating system:   Centos 7 64bit
> Description:        
> 
> 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; 

Well, pg_ugprade uses pg_dump to restore objects so I suggest you look
at the pg_dump output of 9.3 to see why they were not output.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +


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



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: BUG #12088: pg_upgrade 9.3 -> 9.4rc1 - implicit cast not ported
  2014-11-28 08:28 BUG #12088: pg_upgrade 9.3 -> 9.4rc1 - implicit cast not ported ing.marco.colombo@gmail.com
  2014-12-05 12:19 ` Re: BUG #12088: pg_upgrade 9.3 -> 9.4rc1 - implicit cast not ported Bruce Momjian <bruce@momjian.us>
@ 2015-01-09 15:53   ` Marco Colombo <ing.marco.colombo@gmail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Marco Colombo @ 2015-01-09 15:53 UTC (permalink / raw)
  To: Bruce Momjian <bruce@momjian.us>; +Cc: pgsql-bugs

Hi,
I've tried to perform pg_dump with 9.3 binaries but I simply get no errors
and cast are not part of the dump...
So are not restored... How can I continue the investigation?

2014-12-05 13:19 GMT+01:00 Bruce Momjian <bruce@momjian.us>:

> On Fri, Nov 28, 2014 at 08:28:16AM +0000, ing.marco.colombo@gmail.com
> wrote:
> > The following bug has been logged on the website:
> >
> > Bug reference:      12088
> > Logged by:          Marco Colombo
> > Email address:      ing.marco.colombo@gmail.com
> > PostgreSQL version: 9.4beta2
> > Operating system:   Centos 7 64bit
> > Description:
> >
> > 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;
>
> Well, pg_ugprade uses pg_dump to restore objects so I suggest you look
> at the pg_dump output of 9.3 to see why they were not output.
>
> --
>   Bruce Momjian  <bruce@momjian.us>        http://momjian.us
>   EnterpriseDB                             http://enterprisedb.com
>
>   + Everyone has their own god. +
>



-- 
Ing. Marco Colombo

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: BUG #12088: pg_upgrade 9.3 -> 9.4rc1 - implicit cast not ported
  2014-11-28 08:28 BUG #12088: pg_upgrade 9.3 -> 9.4rc1 - implicit cast not ported ing.marco.colombo@gmail.com
@ 2015-01-13 18:41 ` Peter Eisentraut <peter_e@gmx.net>
  2015-01-13 18:59   ` Re: BUG #12088: pg_upgrade 9.3 -> 9.4rc1 - implicit cast not ported Marco Colombo <ing.marco.colombo@gmail.com>
  1 sibling, 1 reply; 5+ messages in thread

From: Peter Eisentraut @ 2015-01-13 18:41 UTC (permalink / raw)
  To: ing.marco.colombo@gmail.com; pgsql-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



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: BUG #12088: pg_upgrade 9.3 -> 9.4rc1 - implicit cast not ported
  2014-11-28 08:28 BUG #12088: pg_upgrade 9.3 -> 9.4rc1 - implicit cast not ported ing.marco.colombo@gmail.com
  2015-01-13 18:41 ` Re: BUG #12088: pg_upgrade 9.3 -> 9.4rc1 - implicit cast not ported Peter Eisentraut <peter_e@gmx.net>
@ 2015-01-13 18:59   ` Marco Colombo <ing.marco.colombo@gmail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Marco Colombo @ 2015-01-13 18:59 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; +Cc: pgsql-bugs

Thanks for the explanation!

Marco Colombo
Il 13/gen/2015 19:41 "Peter Eisentraut" <peter_e@gmx.net> ha scritto:

> 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.
>
>

^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2015-01-13 18:59 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-11-28 08:28 BUG #12088: pg_upgrade 9.3 -> 9.4rc1 - implicit cast not ported ing.marco.colombo@gmail.com
2014-12-05 12:19 ` Bruce Momjian <bruce@momjian.us>
2015-01-09 15:53   ` Marco Colombo <ing.marco.colombo@gmail.com>
2015-01-13 18:41 ` Peter Eisentraut <peter_e@gmx.net>
2015-01-13 18:59   ` Marco Colombo <ing.marco.colombo@gmail.com>

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