Re: Problems modifyiong view

2019-11-14 Thread stan
On Thu, Nov 14, 2019 at 10:12:22AM -0500, Tom Lane wrote: > Adrian Klaver writes: > > On 11/14/19 5:53 AM, stan wrote: > >> I am trying to add columns to a view using CREATE OR REPLACE VIEW, and I am > >> getting the following error: > >> ERROR: cannot change name of view column "descrip" to "con

Re: Problems modifyiong view

2019-11-14 Thread stan
On Thu, Nov 14, 2019 at 06:31:48AM -0800, Adrian Klaver wrote: > On 11/14/19 5:53 AM, stan wrote: > > I am trying to add columns to a view using CREATE OR REPLACE VIEW, and I am > > getting the following error: > > > > ERROR: cannot change name of view column "descrip" to "contact_person_1" > >

Re: Problems modifyiong view

2019-11-14 Thread Adrian Klaver
On 11/14/19 7:54 AM, Adrian Klaver wrote: On 11/14/19 7:45 AM, Tom Lane wrote: Adrian Klaver writes: On 11/14/19 7:12 AM, Tom Lane wrote: If you actually want to rename an existing view column, use ALTER TABLE ... RENAME COLUMN ... for that. Alright, I'm missing something here: test=# a

Re: Problems modifyiong view

2019-11-14 Thread Adrian Klaver
On 11/14/19 7:45 AM, Tom Lane wrote: Adrian Klaver writes: On 11/14/19 7:12 AM, Tom Lane wrote: If you actually want to rename an existing view column, use ALTER TABLE ... RENAME COLUMN ... for that. Alright, I'm missing something here: test=# alter table up_test rename COLUMN col1 to co

Re: Problems modifyiong view

2019-11-14 Thread Tom Lane
Adrian Klaver writes: > On 11/14/19 7:12 AM, Tom Lane wrote: >> If you actually want to rename an existing view column, use >> ALTER TABLE ... RENAME COLUMN ... for that. > Alright, I'm missing something here: > test=# alter table up_test rename COLUMN col1 to col_1; > ALTER TABLE > ... > test=#

Re: Problems modifyiong view

2019-11-14 Thread Adrian Klaver
On 11/14/19 7:12 AM, Tom Lane wrote: Adrian Klaver writes: On 11/14/19 5:53 AM, stan wrote: I am trying to add columns to a view using CREATE OR REPLACE VIEW, and I am getting the following error: ERROR: cannot change name of view column "descrip" to "contact_person_1" Am I missing something

Re: Problems modifyiong view

2019-11-14 Thread Tom Lane
Adrian Klaver writes: > On 11/14/19 5:53 AM, stan wrote: >> I am trying to add columns to a view using CREATE OR REPLACE VIEW, and I am >> getting the following error: >> ERROR: cannot change name of view column "descrip" to "contact_person_1" >> Am I missing something here? > https://www.postgr

Re: Problems modifyiong view

2019-11-14 Thread Adrian Klaver
On 11/14/19 5:53 AM, stan wrote: I am trying to add columns to a view using CREATE OR REPLACE VIEW, and I am getting the following error: ERROR: cannot change name of view column "descrip" to "contact_person_1" I suppose I can drop the view, and recreate it, but that seems to indicate that th

Re: Problems modifyiong view

2019-11-14 Thread Igor Korot
Hi, On Thu, Nov 14, 2019 at 7:54 AM stan wrote: > > I am trying to add columns to a view using CREATE OR REPLACE VIEW, and I am > getting the following error: > > ERROR: cannot change name of view column "descrip" to "contact_person_1" > > I suppose I can drop the view, and recreate it, but tha

Problems modifyiong view

2019-11-14 Thread stan
I am trying to add columns to a view using CREATE OR REPLACE VIEW, and I am getting the following error: ERROR: cannot change name of view column "descrip" to "contact_person_1" I suppose I can drop the view, and recreate it, but that seems to indicate that the create or replace functionality i