public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: Andrei Lepikhov <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Remove unnecessary check on set-returning functions in values_lists
Date: Wed, 28 Aug 2024 23:03:56 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

Andrei Lepikhov <[email protected]> writes:
> I think, the expression_returns_set examination doesn't necessary and we 
> can replace it with an assertion, if needed (see attachment).

I think you may be right that this test is not really necessary given
the upstream parser test, but nonetheless I'm not inclined to remove
it.  The upstream test is very far away in code terms, and there are
nearby steps like SQL-function inlining that make it less than 100%
obvious that an expression that was SRF-free at parse time still is
when we get here.  I also don't care for destroying the parallel that
the comment mentions to the checks done before pulling up a subquery.

I'm reminded of Weinberg’s Law:

	If builders built buildings the way programmers wrote
	programs, then the first woodpecker that came along would
	destroy civilization.

Unless there's a demonstrable, nontrivial performance hit from
this check, I think we should leave it alone.

			regards, tom lane






view thread (3+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Remove unnecessary check on set-returning functions in values_lists
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox