pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Holger Jakobs <holger@jakobs.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: SELECTing from a function where i don't want the results
Date: Wed, 8 Jul 2020 00:38:18 +0200
Message-ID: <5cbe6f6d-5db5-9020-a58b-48ecf91efd61@jakobs.com> (raw)
In-Reply-To: <CAOC+FBXnaxi1yiEv=mL2J1tbnsLfqoneNOnikiQFobdEv=DaWw@mail.gmail.com>
References: <CAOC+FBXnaxi1yiEv=mL2J1tbnsLfqoneNOnikiQFobdEv=DaWw@mail.gmail.com>

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

SELECT mydelete(r) + NULL FROM sometable;

Am 08.07.20 um 00:34 schrieb Wells Oliver:
> Vanilla SQL script calls a plpgsql function to delete some number of
> rows from three tables:
>
> SELECT mydelete(r) FROM sometable;
>
> Where sometable contains maybe 100+ records. This causes the results
> from the function (integer of number of rows removed) to be displayed
> in the output, like you'd kinda expect with a SELECT call, except I
> don't want to see it all, I just want the function quietly executed
> and rows removed.
>
> Can I accomplish this?
>
> -- 
> Wells Oliver
> wells.oliver@gmail.com <mailto:wellsoliver@gmail.com>

-- 
Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012

view thread (16+ messages)  latest in thread

Message-ID: <5cbe6f6d-5db5-9020-a58b-48ecf91efd61@jakobs.com>
Permalink:  ../5cbe6f6d-5db5-9020-a58b-48ecf91efd61@jakobs.com/
Also on:    postgresql.org/message-id/5cbe6f6d-5db5-9020-a58b-48ecf91efd61@jakobs.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: holger@jakobs.com, pgsql-admin@lists.postgresql.org
  Subject: Re: SELECTing from a function where i don't want the results
  In-Reply-To: <5cbe6f6d-5db5-9020-a58b-48ecf91efd61@jakobs.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox