Skip site navigation (1) Skip section navigation (2)

constraint question

From: mwaples(at)optusnet(dot)com(dot)au
To:
Cc: pgsql-novice(at)postgresql(dot)org
Subject: constraint question
Date: 2000-12-31 21:12:38
Message-ID: 3A4FA146.AA4FED3D@optusnet.com.au (view raw or flat)
Thread:
Lists: pgsql-novice
I have table users with a varchar field user_name,
Id like to restrict this to just alphanumeric characters 
can I do this with a check constraint ?
or do I need to use a tigger and function ?

I've read the docs but can't seem to get it right - Im sure its fairly
simple and Id like to use it on a number of fields in a number of tables

In response to

Responses

pgsql-novice by date

Next:From: mwaplesDate: 2000-12-31 21:31:24
Subject: Re: constraint question
Previous:From: Oliver ElphickDate: 2000-12-30 18:45:38
Subject: Re: Re: how to get trigger start function not procedure

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group