Re: Can't use WITH in a PERFORM query in PL/pgSQL? - Mailing list pgsql-bugs

From Valentine Gogichashvili
Subject Re: Can't use WITH in a PERFORM query in PL/pgSQL?
Date
Msg-id CAP93muVCKvMGFzzRzZmQ3t_4JVeOEj5VUVZimaSr8J3QMQZ7Mw@mail.gmail.com
Whole thread Raw
In response to Re: Can't use WITH in a PERFORM query in PL/pgSQL?  (Merlin Moncure <mmoncure@gmail.com>)
Responses Re: Can't use WITH in a PERFORM query in PL/pgSQL?  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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

pgsql-bugs by date:

Previous
From: "Maruthi Kiran"
Date:
Subject: BUG #6262: while installing postgis in make install leavingdirectory
Next
From: "Robert Messer"
Date:
Subject: BUG #6263: \l causes core dump with large database