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
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Merlin Moncure <mmoncure(at)gmail(dot)com>
Subject: Re: Can't use WITH in a PERFORM query in PL/pgSQL?
Date: 2011-10-20 16:19:31
Message-ID: CAP93muVCKvMGFzzRzZmQ3t_4JVeOEj5VUVZimaSr8J3QMQZ7Mw@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-bugs
>
>
> >>
> >> it would be really a good idea to allow SELECT without INTO in plpgsql.
> >
> > SELECT without INTO is useless in plpgsql - because you have to drop
> result.
>
> not if you're calling a function:
> select func();
>
> or calling bunch of functions:

    SELECT func(param) FROM some_subselect_with_params;

or if you do not have writable CTEs yet and have a dream of calling
something like:

    INSERT INTO some_table_with_data ...
    RETURNING func(some_generated_field);

And, ernestly, if it were useless to have SELECT without INTO in plpgsql,
there also would be no PERFORM command in plpgsql...

Best regards,

-- Valentine Gogichashvili

In response to

Responses

pgsql-bugs by date

Next:From: Robert MesserDate: 2011-10-20 16:22:46
Subject: BUG #6263: \l causes core dump with large database
Previous:From: Merlin MoncureDate: 2011-10-20 13:32:38
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