public inbox for [email protected]
help / color / mirror / Atom feedFinding out types of error
2+ messages / 2 participants
[nested] [flat]
* Finding out types of error
@ 2023-07-08 18:55 Shaozhong SHI <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Shaozhong SHI @ 2023-07-08 18:55 UTC (permalink / raw)
To: pgsql-sql <[email protected]>
Having the following:
Begin
insert into a_table select * from a_function
Exception
Raise note 'Skipped"
This works.
Can it trap types of errors to find out what is wrong
Regards,
David
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Finding out types of error
@ 2023-07-08 18:58 David G. Johnston <[email protected]>
parent: Shaozhong SHI <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: David G. Johnston @ 2023-07-08 18:58 UTC (permalink / raw)
To: Shaozhong SHI <[email protected]>; +Cc: pgsql-sql <[email protected]>
On Sat, Jul 8, 2023 at 11:55 AM Shaozhong SHI <[email protected]>
wrote:
>
> Can it trap types of errors to find out what is wrong
>
>
That is what "condition" is for.
https://www.postgresql.org/docs/current/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING
David J.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2023-07-08 18:58 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-07-08 18:55 Finding out types of error Shaozhong SHI <[email protected]>
2023-07-08 18:58 ` David G. Johnston <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox