| From: | Andres Freund <andres(at)anarazel(dot)de> |
|---|---|
| To: | Piergiorgio Buongiovanni <p(dot)buongiovanni(at)net-international(dot)com> |
| Cc: | pgsql-bugs(at)postgresql(dot)org |
| Subject: | Re: BUG #13513: Turning a table into a view |
| Date: | 2015-07-22 10:16:19 |
| Message-ID: | 20150722101619.GF5053@awork2.anarazel.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
Hi,
On 2015-07-22 11:53:16 +0200, Piergiorgio Buongiovanni wrote:
> Just only to answer to your question, we are doing some tests with our
> RAD (Instant Developer) and we are trying to "cheating" it.
Hah.
> PostgreSQL is very powerful allowing us to use views as tables through the RULE mechanism.
> Well. Our RAD doesn't treat views as tables (probably the problem is the JDBC driver) and we cannot insert data into a view.
> So we create a table, then we import that table into the project and the RAD reads all the info (constraints, default values, etc.) and creates the fields correctly.
> At the end we turn the table into a view simply using rules.
You can probably work around the problem by inserting a VACUUM
tbl_becoming_view; before the CREATE RULE. IIRC that should "recompute"
relhastriggers.
Regards,
Andres
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2015-07-22 13:42:15 | Re: BUG #13513: Turning a table into a view |
| Previous Message | Piergiorgio Buongiovanni | 2015-07-22 09:53:16 | Re: BUG #13513: Turning a table into a view |