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: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Relax requirement for INTO with SELECT in pl/pgsql
Date: 2016-03-21 22:26:49
Message-ID: 56F07529.8010806@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 3/21/16 5:03 PM, Merlin Moncure wrote:
> in Oracle, you'd simply do:
> LogIt('I did something');

It would be *great* if we could support that in plpgsql.

> I'm not sure what Oracle does for SELECT statements without INTO/BULK
> UPDATE. I'm not really inclined to care -- I'm really curious to see
> an argument where usage of PERFORM actually helps in some meaningful
> way. Notably, SELECT without INTO is accepted syntax, but fails only
> after running the query. I think that's pretty much stupid but it's
> fair to say I'm not inventing syntax, only disabling the error.

I don't think it buys much at all.

While we're on the subject, it'd be great if variable := SELECT ...
worked too.

> I'm not sure what other databases do is relevant. They use other
> procedure languages than pl//sql (the biggest players are pl/psm and
> t-sql) which have a different set of rules in terms of passing
> variables in and out of queries.

+1
--
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 Stephen Frost 2016-03-21 22:38:01 Re: Minor bug affecting ON CONFLICT lock wait log messages
Previous Message Alvaro Herrera 2016-03-21 22:26:11 Re: WIP: Access method extendability