Re: A problem with dump/restore of views containing whole row references

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Abbas Butt <abbas(dot)butt(at)enterprisedb(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: A problem with dump/restore of views containing whole row references
Date: 2012-04-27 16:13:04
Message-ID: 4F9AC590.7@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 04/27/2012 12:02 PM, Abbas Butt wrote:
>
>
>
> However, is this a change we really want to make?:
>
> pg_get_triggerdef
>
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------
> - CREATE TRIGGER modified_any BEFORE UPDATE OF a ON main_table
> FOR EACH ROW WHEN (old.* IS DISTINCT FROM new.*) EXECUTE PROCEDURE
> trigger_func('modified_any')
> +
> pg_get_triggerdef
>
> +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> + CREATE TRIGGER modified_any BEFORE UPDATE OF a ON main_table
> FOR EACH ROW WHEN (old.*::main_table IS DISTINCT FROM
> new.*::main_table) EXECUTE PROCEDURE trigger_func('modified_any')
>
>
> Maybe we need to be a bit more selective about when the cast is
> supplied. It's not adding any extra disambiguation (or clarity) here.
>
>
>
> I ran the regression and found that my patch is causing a diff in the
> trigger test case, thats why I changed the expected output of the test
> case accordingly. This is a side effect of the change I did to fix the
> bug.
>

Right, what I'm asking is whether or not we actually want that side
effect in all cases, and specifically in this case where it's clearly
not necessary.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-04-27 16:34:31 Re: default_transaction_isolation = serializable causes crash under Hot Standby
Previous Message Abbas Butt 2012-04-27 16:02:53 Re: A problem with dump/restore of views containing whole row references