public inbox for [email protected]
help / color / mirror / Atom feedFrom: Shaozhong SHI <[email protected]>
To: pgsql-sql <[email protected]>
Subject: How do Exception, do nothing and carry on
Date: Thu, 6 Jul 2023 22:47:12 +0100
Message-ID: <CA+i5Jwa9E1RyApZYViBgG9yyCRT5V4WKRAeWDXuVe_1qf4uCsA@mail.gmail.com> (raw)
The function in the following block code may fail.
How to make it to carry on by ignoring exception?
Something like Python's try catch.
for i in (select distinct id from id_table)
loop
raise notice '%', i;
insert into my_table(id, last, arr, count) SELECT i, * from
my_function(i) f(last int, arr int[], count int);
commit;
end loop;
view thread (2+ messages) latest in thread
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: [email protected]
Cc: [email protected], [email protected]
Subject: Re: How do Exception, do nothing and carry on
In-Reply-To: <CA+i5Jwa9E1RyApZYViBgG9yyCRT5V4WKRAeWDXuVe_1qf4uCsA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox