Skip site navigation (1) Skip section navigation (2)

Re: Can't use WITH in a PERFORM query in PL/pgSQL?

From: Valentine Gogichashvili <valgog(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Can't use WITH in a PERFORM query in PL/pgSQL?
Date: 2011-10-20 06:41:10
Message-ID: CAP93muUHoGyyewC=XgBd33SB-VuEBRNHDsbC_DV2kOHsJWWv9w@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-bugs
>
>
> I suppose you could argue that selecting a value and implicitly throwing
> it away is confusing to novices, but on the other hand I've seen a whole
> lot of novices confused by the need to write PERFORM instead of SELECT.
> I think it wouldn't be an unreasonable thing to just interpret a SELECT
> with no INTO clause as being a PERFORM (ie execute and discard results).
> Then we'd not have to do anything magic for commands starting with WITH.
>
>                        regards, tom lane
>
>
it would be really a good idea to allow SELECT without INTO in plpgsql.

PERFORM just makes things much more complicated, without actually adding any
really working "protection" from misusing SELECT without INTO.

With best regards,
-- Valentin Gogichashvili

In response to

Responses

pgsql-bugs by date

Next:From: Pavel StehuleDate: 2011-10-20 07:28:36
Subject: Re: Can't use WITH in a PERFORM query in PL/pgSQL?
Previous:From: Pavel StehuleDate: 2011-10-20 04:35:56
Subject: Re: Can't use WITH in a PERFORM query in PL/pgSQL?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group