Skip site navigation (1) Skip section navigation (2)

pgsql: Apply a simple solution to the problem of making

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Apply a simple solution to the problem of making
Date: 2006-09-02 17:06:52
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-committers
Log Message:
Apply a simple solution to the problem of making INSERT/UPDATE/DELETE
RETURNING play nice with views/rules.  To wit, have the rule rewriter
rewrite any RETURNING clause found in a rule to produce what the rule's
triggering query asked for in its RETURNING clause, in particular drop
the RETURNING clause if no RETURNING in the triggering query.  This
leaves the responsibility for knowing how to produce the view's output
columns on the rule author, without requiring any fundamental changes
in rule semantics such as adding new rule event types would do.  The
initial implementation constrains things to ensure that there is
exactly one, unconditionally invoked RETURNING clause among the rules
for an event --- later we might be able to relax that, but for a post
feature freeze fix it seems better to minimize how much invention we do.
Per gripe from Jaime Casanova.

Modified Files:
        rules.sgml (r1.45 -> r1.46)
        create_rule.sgml (r1.45 -> r1.46)
        rewriteDefine.c (r1.112 -> r1.113)
        rewriteHandler.c (r1.165 -> r1.166)
        returning.out (r1.2 -> r1.3)
        returning.sql (r1.2 -> r1.3)

pgsql-committers by date

Next:From: Bruce MomjianDate: 2006-09-02 17:08:10
Subject: pgsql: Remove GUC_REPORT for new "server_version_num" GUC variable.
Previous:From: Bruce MomjianDate: 2006-09-02 17:05:29
Subject: pgsql: Add functions to /contrib/pgstattuple that show index statistics

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group