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 401B252896 for ; Thu, 9 Jun 2005 05:39:22 -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 03803-07 for ; Thu, 9 Jun 2005 08:39:11 +0000 (GMT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.188]) by svr1.postgresql.org (Postfix) with ESMTP id E74835285B for ; Thu, 9 Jun 2005 05:39:10 -0300 (ADT) Received: from [194.25.154.138] (helo=webserv.wug.de) by mrelayeu.kundenserver.de with ESMTP (Nemesis), id 0ML29c-1DgIZA05r4-0006rS; Thu, 09 Jun 2005 10:39:08 +0200 Received: from kretschmer by webserv.wug.de with local (Exim 3.36 #1) id 1DgIZB-0001HE-00; Thu, 09 Jun 2005 10:39:09 +0200 Date: Thu, 9 Jun 2005 10:39:09 +0200 From: Andreas Kretschmer To: PostgreSQL SQL Cc: Bruno Wolff III , Andreas Kretschmer Subject: Re: [despammed] rejecting characters in a field Message-ID: <20050609083909.GI303@webserv.wug-glas.de> Mail-Followup-To: Andreas Kretschmer , PostgreSQL SQL , Bruno Wolff III References: <200506091236.31790.lawgon@thenilgiris.com> <20050609071809.GB303@webserv.wug-glas.de> <20050609082915.GA25807@wolff.to> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050609082915.GA25807@wolff.to> X-DEST: 208 X-MSMail-Priority: High X-Message-Flag: Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) X-PrivatMail: kretschmer@kaufbach.delug.de X-OS: Linux - weil ich es mir Wert bin! X-Info: registrierter Linux-User 97922 http://counter.li.org User-Agent: mutt-ng 1.5.9i (Linux) X-Provags-ID: kundenserver.de abuse@kundenserver.de login:51ea9561fc3f6d9539a2acd743e4748c X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.313 tagged_above=0 required=5 tests=AWL, MISSING_MIMEOLE, X_MSMAIL_PRIORITY_HIGH X-Spam-Level: X-Archive-Number: 200506/136 X-Sequence-Number: 21737 am 09.06.2005, um 3:29:15 -0500 mailte Bruno Wolff III folgendes: > 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. Yes, okay. Regards, Andreas -- Andreas Kretschmer (Kontakt: siehe Header) Heynitz: 035242/47212, D1: 0160/7141639 GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net === Schollglas Unternehmensgruppe ===