Add constraint for number of chars

From: PostgreSQL Admin <postgres(at)productivitymedia(dot)com>
To: PostgreSQL SQL List <pgsql-sql(at)postgresql(dot)org>
Subject: Add constraint for number of chars
Date: 2007-04-26 04:41:44
Message-ID: 46302D88.7070804@productivitymedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

This is seemly simple, but I'm @ a loss this early in the morning. It's
best explained this way

SAMPLE
-----------------------------------
id | serial |
username | varchar(100)| constraint username >=8 and username <=100

The problem is that it's characters not integers or numeric. It my
constraint correct?

Thanks for the help,
J

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2007-04-26 05:25:10 Re: Add constraint for number of chars
Previous Message Nemo Terry 2007-04-26 04:11:02 Re: Which function transform x,y to latitude/longitude?