Re: Updatable view should truncate table fields

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Updatable view should truncate table fields
Date: 2011-11-12 10:09:15
Message-ID: j9lgkb$id5$1@reversiblemaps.ath.cx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On 2011-11-08, Russell Keane <Russell(dot)Keane(at)inps(dot)co(dot)uk> wrote:
>
> We can extend the table to accept more than 5 characters but the view must =
> return 5 characters.
> If we try to extend the table to accept, say, 10 characters the view will d=
> isplay 10.
> If I also cast the view field to 5 characters then any insert with more tha=
> n 5 characters still fails.
>
> Any ideas???

re-load the view and functions, they are sill defined with the char(5)
column (you'll probably yneed to drop them all (but not the table) first).

plpgsql functions are partially compiled at the time they are defined
subsequent modifictions to the datatypes in their definition will
cause errors until they are re-defined

--

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Brice André 2011-11-15 13:36:34 pg_dump : problem with grant on table columns
Previous Message Jasen Betts 2011-11-12 09:56:02 Re: Partitionning + Trigger and Execute not working as expected