From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: goodluck.deep989@gmail.com <goodluck.deep989@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: Bug : Did't show Constaint violation error
Date: Sun, 28 Feb 2021 20:34:55 -0500
Message-ID: <663313.1614562495@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwYgkVr0C4O1ptWrb-RY3pmXjMw_MZSWrdo0+VkJdcxpew@mail.gmail.com>
References: <4F2A147E-89DD-417B-8AA9-FD37AC2B4D6E@hxcore.ol>
<CAKFQuwYgkVr0C4O1ptWrb-RY3pmXjMw_MZSWrdo0+VkJdcxpew@mail.gmail.com>
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Sunday, February 28, 2021, <goodluck.deep989@gmail.com> wrote:
>> I think it should not allow to add this constraint if we have the column
>> char size is less than the size of values on which we are putting the
>> constraints.
> It doesn’t seem worth the effort.
Even more to the point, it'd probably be a violation of the SQL standard.
The standard does not prohibit unsatisfiable constraints. (IIRC, people
actually use such things, too, if they want an empty table to stay empty.)
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, goodluck.deep989@gmail.com
Subject: Re: Bug : Did't show Constaint violation error
In-Reply-To: <663313.1614562495@sss.pgh.pa.us>
References: <4F2A147E-89DD-417B-8AA9-FD37AC2B4D6E@hxcore.ol> <CAKFQuwYgkVr0C4O1ptWrb-RY3pmXjMw_MZSWrdo0+VkJdcxpew@mail.gmail.com> <663313.1614562495@sss.pgh.pa.us>
* 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