Re: Relax requirement for INTO with SELECT in pl/pgsql

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Relax requirement for INTO with SELECT in pl/pgsql
Date: 2016-03-23 15:57:58
Message-ID: 56F2BD06.7020808@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 3/22/16 8:37 AM, Merlin Moncure wrote:
>> I afraid of useless and forgotten call of functions. But the risk is same
>> >like PERFORM - so this is valid from one half. The PERFORM statement holds
>> >special semantic, and it is interesting.
> I see your point here, but the cost of doing that far outweighs the
> risks. And I don't think the arbitrary standard of defining forcing
> the user to identify if the query should return data is a good way of
> identifying dead code.

Not to mention that there's tons of other ways to introduce unintended
inefficiencies. Off the top of my head, declaring variables that are
never referenced and have no assignment is a big one.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-03-23 15:58:14 Re: [PATCH] fix DROP OPERATOR to reset links to itself on commutator and negator
Previous Message Alvaro Herrera 2016-03-23 15:54:50 Re: README for src/backend/replication/logical