From: | Tomonari Katsumata <t(dot)katsumata1122(at)gmail(dot)com> |
---|---|
To: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #8542: Materialized View with another column_name does not work? |
Date: | 2013-10-21 10:44:57 |
Message-ID: | CAC55fYe5Pf=TNr8fuAdtwMXK++jSDXm-kjrivtvVX28p3XWkhA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
Hi Michael,
Thank you for replying!
I understand it seems a bug.
After some trying, I got a workaround for this.
CREATE MATERIALIZED VIEW mv_t AS SELECT i ii FROM t;
This seems working fine.
2013/10/21 Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
> On Mon, Oct 21, 2013 at 6:41 PM, <t(dot)katsumata1122(at)gmail(dot)com> wrote:
> > - Creating materialized view with column_name
> > CREATE MATERIALIZED VIEW mv_t(ii) AS SELECT * FROM t;
> > And then, I got a bellow ERROR.
> > ----
> > ERROR: SELECT rule's target entry 1 has different column name from "ii"
> > Is this a bug or restriction for Materialized View?
> Looks like a bug as documentation is clear here: "If column names are
> not provided, they are taken from the output column names of the
> query".
> http://www.postgresql.org/docs/9.3/static/sql-creatematerializedview.html
> In your case you are providing the column names, so they should be
> used for this matview.
>
> Regards,
> --
> Michael
>
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2013-10-21 13:31:08 | Re: BUG #8532: postgres fails to start with timezone-data >=2013e |
Previous Message | Michael Paquier | 2013-10-21 10:02:23 | Re: BUG #8542: Materialized View with another column_name does not work? |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2013-10-21 10:46:10 | Re: Improve setup for documentation building with FOP |
Previous Message | KONDO Mitsumasa | 2013-10-21 10:27:26 | Re: [HACKERS] Who is pgFoundery administrator? |