lowercase on columnname using view - Mailing list pgsql-general

From Chrishelring
Subject lowercase on columnname using view
Date
Msg-id 1336474817840-5693220.post@n5.nabble.com
Whole thread Raw
Responses Re: lowercase on columnname using view
Re: lowercase on columnname using view
List pgsql-general
Hi all,

had some help the other day, but now I´m kinda stuck again. :/

I have a table ("virksomhedsdata") with the following columns:

"MI_STYLE" character varying(254),
 "MI_PRINX" integer NOT NULL DEFAULT
nextval('rk_ois."virksomhedsdata_MI_PRINX_seq"'::regclass),
 "SP_GEOMETRY" geometry,

I would like to make a view so that the columnnames are presented in
lowercase. I thought that the following would work:

CREATE OR REPLACE VIEW rk_ois.virksomhedsdata AS
 SELECT  virksomhedsdata.MI_STYLE AS mi_style, virksomhedsdata.MI_PRINX as
mi_prinx, virksomhedsdata.SP_GEOMETRY AS sp_geometry
   FROM rk_ois.virksomhedsdata;

But it fails saying that column virksomhedsdata.mi_style does not exist.

What am I doing wrong here?

thanks!

Christian

--
View this message in context: http://postgresql.1045698.n5.nabble.com/lowercase-on-columnname-using-view-tp5693220.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

pgsql-general by date:

Previous
From: Alban Hertroys
Date:
Subject: Re: FATAL: lock file "postmaster.pid" already exists
Next
From: Szymon Guz
Date:
Subject: Re: lowercase on columnname using view