On 17 Apr 2012, at 14:45, Moh Ilhami <[email protected]> wrote:

> Saya mau menambah lebar column di postgresql, misal dari varchar(20)
> menjadi varchar(30), atau numeric(2,0) menjadi numeric(5,0).
> Perintah yang saya gunakan adalah:
>
> alter table customer_order alter column total_order  type numeric(5,0);
>
> Tapi selalu muncul pesan:
> ERROR:  cannot alter type of a column used by a view or rule
> DETAIL:  rule _RETURN on view v_customer_order depends on column "total_order"
>
> Apa ada cara lain alter table column, tanpa harus drop view dan re-create 
> view ?

View semestinya di drop dan di recreate secara otomatis setelah
expired, supaya isi viewnya mengikuti data real.

Drop saja viewnya, alter table, lalu create ulang viewnya.

--
Donny Kurnia
Apple ID: [email protected]
Twitter: @donnykurnia
Skype: donnykurnia
My online profile:
http://www.linkedin.com/in/donnykurnia
http://careers.stackoverflow.com/donnykurnia
http://re.vu/donnykurnia
http://hantulab.blogspot.com
-------------------------------------------
At times the world can seem an unfriendly and sinister place. But
believe us when we say there is much more good in it than bad. And
what might seem to be a series of unfortunate events, may in fact, be
the first steps of a journey.
-- A Series of Unfortunate Events

-- 
FAQ milis di http://wiki.linux.or.id/FAQ_milis_tanya-jawab
Unsubscribe: kirim email ke [email protected]
Arsip dan info milis selengkapnya di http://linux.or.id/milis

Kirim email ke