Re: Problems With VIEWS

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: Adam Rich <adam(dot)r(at)sbcglobal(dot)net>, 'Jeanna Geier' <jgeier(at)apt-cafm(dot)com>, 'pgsql-general' <pgsql-general(at)postgresql(dot)org>
Subject: Re: Problems With VIEWS
Date: 2007-01-11 00:14:07
Message-ID: 390994.34836.qm@web31804.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

also,
if you open up psql, you can type "\d <view_name>"
and it will tell you everything about the view.

--- Adam Rich <adam(dot)r(at)sbcglobal(dot)net> wrote:

>
> Select * from pg_rules ?
>
>
> -----Original Message-----
> From: pgsql-general-owner(at)postgresql(dot)org
> [mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Jeanna Geier
> Sent: Wednesday, January 10, 2007 5:43 PM
> To: Richard Broersma Jr; pgsql-general
> Subject: Re: [GENERAL] Problems With VIEWS
>
>
> I guess I have a general question regarding Postgres and RULES --
> relative
> newbie here, especially with these 'custom' functions -- where/how can
> you
> view the RULES in Postgres?
>
> I use CaseStudio to generate my Schemas/create my Rules and then import
> them
> into Postgres to create my tables and views - is there anyway for me to
> view
> them in Postgres to verify that they got imported correctly? I can view
> the
> .sql files that I imported to verify the CREATE functions, etc., but
> when I
> search these files, the "CREATE RULE" commands are not in there...
>
> Thanks much,
> -Jeanna
>
> -----Original Message-----
> From: pgsql-general-owner(at)postgresql(dot)org
> [mailto:pgsql-general-owner(at)postgresql(dot)org]On Behalf Of Richard Broersma
> Jr
> Sent: Wednesday, January 10, 2007 5:04 PM
> To: Jeanna Geier; pgsql-general
> Subject: Re: [GENERAL] Problems With VIEWS
>
>
> > 2007-01-10 16:45:33 ERROR: cannot insert into a view
> > 2007-01-10 16:45:33 HINT: You need an unconditional ON INSERT DO
> INSTEAD
> > rule.
>
> Also, I see you have this field in your insert rule:
>
> new.upgrade_date
>
> but I see so upgrade_date in you view's definition. What exactly do you
> intend to be inserted.
> All of the New.[field_names] in the insert statement must be view
> fieldnames
> not table fieldnames.
>
> Regards,
> Richard Broersma Jr.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org/
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John Smith 2007-01-11 00:14:44 tsearch2 headline() query subselect help
Previous Message Adam Rich 2007-01-10 23:46:54 Re: Problems With VIEWS