Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id F31A22E004B for ; Tue, 20 May 2008 12:30:24 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 53664-08 for ; Tue, 20 May 2008 12:30:18 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp162.iad.emailsrvr.com (smtp162.iad.emailsrvr.com [207.97.245.162]) by developer.postgresql.org (Postfix) with ESMTP id 2FFB82E003B for ; Tue, 20 May 2008 12:30:16 -0300 (ADT) Received: from relay6.relay.iad.emailsrvr.com (localhost [127.0.0.1]) by relay6.relay.iad.emailsrvr.com (SMTP Server) with ESMTP id B08A5767118; Tue, 20 May 2008 11:30:15 -0400 (EDT) Received: by relay6.relay.iad.emailsrvr.com (Authenticated sender: chander-AT-otg-nc.com) with ESMTP id 89F077670C3; Tue, 20 May 2008 11:30:15 -0400 (EDT) Message-ID: <4832EE8F.3030300@otg-nc.com> Date: Tue, 20 May 2008 11:30:23 -0400 From: Chander Ganesan User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Marc Fromm CC: pgsql-admin@postgresql.org Subject: Re: character varying exceeded References: <81FEAB8CDDC62B42B6E8AA258228BC8805657B98@EVS2.univ.dir.wwu.edu> In-Reply-To: <81FEAB8CDDC62B42B6E8AA258228BC8805657B98@EVS2.univ.dir.wwu.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/169 X-Sequence-Number: 29253 Marc Fromm wrote: > WE have a db with a column/field of type "character varying" set to a > length of 1000. A user attempted to enter data into this column/field > breached the 1000 limit. When the user submitted the form the data was > not entered into the database and no error or message was displayed. > > Is there a way to have postgresql let the user no the entry attempt was > declined? What is the best way to handle these situations PostgreSQL does indicate that the statement failed. Chances are your application code (that does the insert) is ignoring the error. You should check your application code to ensure that it's handling error messages on insert failures correctly, and notifying the user as appropriate. -- Chander Ganesan Open Technology Group, Inc. One Copley Parkway, Suite 210 Morrisville, NC 27560 919-463-0999/877-258-8987 http://www.otg-nc.com Ask me about OTG's Expert PostgreSQL, PostGIS, PHP, and other Open Source training offerings.