Re: Proof of concept: auto updatable views [Review of Patch]

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Cc: Amit kapila <amit(dot)kapila(at)huawei(dot)com>, "robertmhaas(at)gmail(dot)com" <robertmhaas(at)gmail(dot)com>, "tgl(at)sss(dot)pgh(dot)pa(dot)us" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proof of concept: auto updatable views [Review of Patch]
Date: 2012-10-11 01:39:21
Message-ID: 1349919561.30900.4.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Compiler warning needs to be fixed:

rewriteHandler.c: In function 'RewriteQuery':
rewriteHandler.c:2153:29: error: 'view_rte' may be used uninitialized in this function [-Werror=maybe-uninitialized]
rewriteHandler.c:2015:17: note: 'view_rte' was declared here

Duplicate OIDs need to be adjusted:

FATAL: could not create unique index "pg_proc_oid_index"
DETAIL: Key (oid)=(3172) is duplicated.

Maybe we should distinguish updatable from insertable in error messages
like this one:

ERROR: cannot insert into view "foov2"
DETAIL: Views containing DISTINCT are not updatable.

The SQL standard distinguishes the two, so there could be differences.
I'm not sure what they are right now, though.

This hint could use some refreshing:

HINT: You need an unconditional ON INSERT DO INSTEAD rule or an INSTEAD OF INSERT trigger.

Maybe something along the lines of

HINT: To make the view insertable anyway, supply an unconditional ... etc.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-10-11 01:40:14 Re: [PATCH 8/8] Introduce wal decoding via catalog timetravel
Previous Message Bruce Momjian 2012-10-11 01:34:28 Re: change in LOCK behavior