agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: Rob Sargent <robjsargent@gmail.com>
To: Karsten Hilbert <Karsten.Hilbert@gmx.net>
Cc: pgsql-sql@lists.postgresql.org
Subject: Re: How to capture error message and save to a table in PostgreSQL?
Date: Sat, 9 Oct 2021 12:29:27 -0600
Message-ID: <4A26A02A-318A-4F46-B18B-860AE3756727@gmail.com> (raw)
In-Reply-To: <YWHd4oFbPd3eKpI0@hermes.hilbert.loc>
References: <YWHd4oFbPd3eKpI0@hermes.hilbert.loc>
> On Oct 9, 2021, at 12:22 PM, Karsten Hilbert <Karsten.Hilbert@gmx.net> wrote:
>
> Am Fri, Oct 08, 2021 at 10:45:45AM +0100 schrieb Shaozhong SHI:
>
>> I wish to test out to produce a table when data violates constraints when
>> insert into a new table with constraint set. How to capture and save error
>> message to a new table?
>
> That depends on how you access the table and at which level
> you wish the above to happen.
>
> You need to be less generic to get better help.
>
If there is a client application involved you might be better off validating the input there rather than going all the way to the server with bad data.
>
view thread (4+ messages)
Message-ID: <4A26A02A-318A-4F46-B18B-860AE3756727@gmail.com>
Permalink: ../4A26A02A-318A-4F46-B18B-860AE3756727@gmail.com/
Also on: postgresql.org/message-id/4A26A02A-318A-4F46-B18B-860AE3756727@gmail.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-sql@postgresql.org
Cc: robjsargent@gmail.com, Karsten.Hilbert@gmx.net, pgsql-sql@lists.postgresql.org
Subject: Re: How to capture error message and save to a table in PostgreSQL?
In-Reply-To: <4A26A02A-318A-4F46-B18B-860AE3756727@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