On Wed, Oct 11, 2017 at 11:36 AM, Yugo Nagata wrote:
> In the attached patch, only automatically-updatable views that do not have
> INSTEAD OF rules or INSTEAD OF triggers are lockable. It is assumed that
> those views definition have only one base-relation. When an auto-updatable
> view is locked
> I'm a bit confused. What is difference between tables and functions
> in a subquery with regard to view locking? I think also none view queries
> using a subquery do not care about the changes of tables in the
> subquery while executing the query. I might be misnderstanding
> the problem you men
On Mon, 16 Oct 2017 10:07:48 +0900 (JST)
Tatsuo Ishii wrote:
> >> >> test=# CREATE VIEW v3 AS SELECT count(*) FROM v1;
> >> >> CREATE VIEW
> >> >> test=# BEGIN;
> >> >> BEGIN
> >> >> test=# LOCK TABLE v3;
> >> >> ERROR: cannot lock view "v3"
> >> >> DETAIL: Views that return aggregate functions
>> >> test=# CREATE VIEW v3 AS SELECT count(*) FROM v1;
>> >> CREATE VIEW
>> >> test=# BEGIN;
>> >> BEGIN
>> >> test=# LOCK TABLE v3;
>> >> ERROR: cannot lock view "v3"
>> >> DETAIL: Views that return aggregate functions are not automatically
>> >> updatable.
>> >
>> > It would be nice if the m
On Thu, 12 Oct 2017 13:11:45 +0900 (JST)
Tatsuo Ishii wrote:
> >> test=# CREATE VIEW v3 AS SELECT count(*) FROM v1;
> >> CREATE VIEW
> >> test=# BEGIN;
> >> BEGIN
> >> test=# LOCK TABLE v3;
> >> ERROR: cannot lock view "v3"
> >> DETAIL: Views that return aggregate functions are not automaticall
>> test=# CREATE VIEW v3 AS SELECT count(*) FROM v1;
>> CREATE VIEW
>> test=# BEGIN;
>> BEGIN
>> test=# LOCK TABLE v3;
>> ERROR: cannot lock view "v3"
>> DETAIL: Views that return aggregate functions are not automatically
>> updatable.
>
> It would be nice if the message would be something like
> Hi,
>
> Attached is a patch to enable views to be locked.
Nice.
> PostgreSQL has supported automatically updatable views since 9.3, so we can
> udpate simply defined views like regular tables. However, currently,
> table-level locks on views are not supported. We can not execute LOCK TABLE
>
Hi,
Attached is a patch to enable views to be locked.
PostgreSQL has supported automatically updatable views since 9.3, so we can
udpate simply defined views like regular tables. However, currently,
table-level locks on views are not supported. We can not execute LOCK TABLE
for views, while we c