Re: views

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrzej Barszcz <abusinf(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: views
Date: 2017-12-06 17:04:12
Message-ID: 24629.1512579852@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrzej Barszcz <abusinf(at)gmail(dot)com> writes:
> I would be happy when checkRuleResultList in rewriteDefine.c lost so strict
> conditions for returning clause. Are there any reasons to have such
> restriction for views ?

Uh, so that the results of a query that invokes the rule are well-defined?

If you think that for your application, it's okay for the RETURNING rule
to not bother providing useful data for some columns, you could just have
it return nulls for those. But I don't think it's appropriate for the
system itself to make a value judgement like that. If the columns don't
match up, it could very well be user error, and we should report that.

regards, tom lane

In response to

  • views at 2017-12-06 16:53:44 from Andrzej Barszcz

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-12-06 17:06:31 Re: [HACKERS] parallel.c oblivion of worker-startup failures
Previous Message Adam Brusselback 2017-12-06 17:02:41 Re: Postgres with pthread