Bug : Did't show Constaint violation error

From: <goodluck(dot)deep989(at)gmail(dot)com>
To: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Bug : Did't show Constaint violation error
Date: 2021-02-28 19:12:41
Message-ID: 4F2A147E-89DD-417B-8AA9-FD37AC2B4D6E@hxcore.ol
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style></head><body lang=EN-IN link=blue vlink="#954F72" style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal>Hi,</p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Able to add below constraint check even after column student_name char size is 1.</p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>ALTER TABLE public.student</p><p class=MsoNormal>add check ( student_name in ('Pune', 'Bombay', 'Delhi'));</p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>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.</p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Thanks,</p><p class=MsoNormal>Kuldeep</p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986">Mail</a> for Windows 10</p><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2">
<br /><br />
<hr style='border:none; color:#909090; background-color:#B0B0B0; height: 1px; width: 99%;' />
<table style='border-collapse:collapse;border:none;'>
<tr>
<td style='border:none;padding:0px 15px 0px 8px'>
<a href="https://www.avast.com/antivirus">
<img border=0 src="https://static.avast.com/emails/avast-mail-stamp.png" alt="Avast logo" />
</a>
</td>
<td>
<p style='color:#3d4d5a; font-family:"Calibri","Verdana","Arial","Helvetica"; font-size:12pt;'>
This email has been checked for viruses by Avast antivirus software.
<br><a href="https://www.avast.com/antivirus">www.avast.com</a>
</p>
</td>
</tr>
</table>
<br />
<a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div></body></html>

Attachment Content-Type Size
unknown_filename text/html 2.7 KB

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2021-02-28 23:05:42 Re: Bug : Did't show Constaint violation error
Previous Message Alvaro Herrera 2021-02-28 16:16:06 Re: pg_event_trigger_ddl_commands fails with cache lookup failed