pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Piergiorgio Buongiovanni <p.buongiovanni@net-international.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #13513: Turning a table into a view
Date: Wed, 22 Jul 2015 12:16:19 +0200
Message-ID: <20150722101619.GF5053@awork2.anarazel.de> (raw)
In-Reply-To: <416591758.338151.1437558796979.JavaMail.zimbra@net-international.com>
References: <20150722082538.9705.21746@wrigleys.postgresql.org>
	<20150722085906.GE5053@awork2.anarazel.de>
	<416591758.338151.1437558796979.JavaMail.zimbra@net-international.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (6+ messages)  latest in thread

Message-ID: <20150722101619.GF5053@awork2.anarazel.de>
Permalink:  ../20150722101619.GF5053@awork2.anarazel.de/
Also on:    postgresql.org/message-id/20150722101619.GF5053@awork2.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: andres@anarazel.de, p.buongiovanni@net-international.com
  Subject: Re: BUG #13513: Turning a table into a view
  In-Reply-To: <20150722101619.GF5053@awork2.anarazel.de>
  References: <20150722082538.9705.21746@wrigleys.postgresql.org> <20150722085906.GE5053@awork2.anarazel.de> <416591758.338151.1437558796979.JavaMail.zimbra@net-international.com> <20150722101619.GF5053@awork2.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox