X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E5E47528C7 for ; Thu, 9 Jun 2005 05:30:01 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 03720-05 for ; Thu, 9 Jun 2005 08:29:57 +0000 (GMT) Received: from wolff.to (wolff.to [66.93.197.194]) by svr1.postgresql.org (Postfix) with SMTP id 808F352883 for ; Thu, 9 Jun 2005 05:29:55 -0300 (ADT) Received: (qmail 25839 invoked by uid 500); 9 Jun 2005 08:29:15 -0000 Date: Thu, 9 Jun 2005 03:29:15 -0500 From: Bruno Wolff III To: Andreas Kretschmer , PostgreSQL SQL Subject: Re: [despammed] rejecting characters in a field Message-ID: <20050609082915.GA25807@wolff.to> Mail-Followup-To: Bruno Wolff III , Andreas Kretschmer , PostgreSQL SQL References: <200506091236.31790.lawgon@thenilgiris.com> <20050609071809.GB303@webserv.wug-glas.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050609071809.GB303@webserv.wug-glas.de> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.008 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/135 X-Sequence-Number: 21736 On Thu, Jun 09, 2005 at 09:18:09 +0200, Andreas Kretschmer wrote: > am 09.06.2005, um 12:36:31 +0530 mailte Kenneth Gonsalves folgendes: > > hi > > i have a table with a varchar field called 'name'. I want postgres to > > reject any insert with characters defined as illegal characters, for > > example '*/^#'. How do i do this? > > With a RULE or a TRIGGER. Using a check constraint would be better a better way to do this.