From: | Bernd Helmle <mailings(at)oopsware(dot)de> |
---|---|
To: | Richard Broersma Jr <rabroersma(at)yahoo(dot)com> |
Cc: | Jeanna Geier <jgeier(at)apt-cafm(dot)com>, Adam Rich <adam(dot)r(at)sbcglobal(dot)net>, pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Problems With VIEWS |
Date: | 2007-01-11 15:02:25 |
Message-ID: | 432ca732d1006ee556d8d44de2cc21fd@oopsware.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, 11 Jan 2007 06:36:34 -0800 (PST), Richard Broersma Jr <rabroersma(at)yahoo(dot)com> wrote:
>
> Either way. I like to create sql files with all of the DDL for creating
> the view and rules.
> Overtime, if I need to change my view or reconfigure the rules, I can edit
> my sql file and then
> call it up in psql using "\e <view_def.sql>"
>
> I use the "CREATE OR REPLACE VIEW" syntax to achieve this.
>
Additional note: REPLACE doesn't work if you are going to change the
list/type/name of your view columns. In 8.2 and above you could use
DROP VIEW IF EXISTS combined with a following CREATE VIEW, instead.
Bernd
From | Date | Subject | |
---|---|---|---|
Next Message | Russell Smith | 2007-01-11 15:05:45 | Re: Problems With VIEWS |
Previous Message | Richard Broersma Jr | 2007-01-11 14:36:34 | Re: Problems With VIEWS |