Re: SELECTing from a function where i don't want the results - Mailing list pgsql-admin

From Wells Oliver
Subject Re: SELECTing from a function where i don't want the results
Date
Msg-id CAOC+FBWojV_WQvOAR-eX4oUmbxR_wzRzQrr5G96Awu=sppLQgA@mail.gmail.com
Whole thread Raw
In response to Re: SELECTing from a function where i don't want the results  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-admin
Yeah. I just kinda want a silent SELECT since the function I'm calling just deletes, and I don't care about the output.

I'm guessing this is just something I need to get over.

On Tue, Jul 7, 2020 at 5:07 PM David G. Johnston <david.g.johnston@gmail.com> wrote:
On Tuesday, July 7, 2020, Holger Jakobs <holger@jakobs.com> wrote:

You could combine the result with a NULL value, as any operations with NULL result in NULL.

SELECT mydelete(r) + NULL FROM sometable;

So now you have 100 rows containing null (assuming that indeed function result + unknown means something and you don’t just get an error) which is no better than what is the probably 100 rows of void output the OP is complaining about.

David J.



--

pgsql-admin by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: SELECTing from a function where i don't want the results
Next
From: "David G. Johnston"
Date:
Subject: Re: SELECTing from a function where i don't want the results