Re: pg_get_viewdef() drops casts, causing broken definitions

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Christophe Pettus <xof(at)thebuild(dot)com>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: pg_get_viewdef() drops casts, causing broken definitions
Date: 2016-05-14 03:01:02
Message-ID: CAKFQuwaB83bzmyxGquG4aq4=8CbsJ55PbMWgR92bSEPeTsephQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, May 13, 2016 at 10:50 PM, Christophe Pettus <xof(at)thebuild(dot)com>
wrote:

> PostgreSQL 9.5.2.
>
> I ran into this while doing a pgupgrade; it refused to re-import a view
> that was operating correctly on 9.2.
>
> Summary: The view text returned by pg_get_viewdef() strips some casts,
> which can result in an error in trying to recreate the view. This means
> you can't successfully recreate those views from a pg_dump.
>

​Your example should work in 9.5.3; please upgrade and post back if it does
not.

David J.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2016-05-14 03:01:54 Re: pg_get_viewdef() drops casts, causing broken definitions
Previous Message Christophe Pettus 2016-05-14 02:50:02 pg_get_viewdef() drops casts, causing broken definitions