Re: [SQL] Add constraint for number of chars

2007-04-25 Thread Tom Lane
PostgreSQL Admin <[EMAIL PROTECTED]> writes: > username | varchar(100)| constraint username >=8 and username <=100 Perhaps you mean "length(username) >= 8" and so on? regards, tom lane ---(end of broadcast)--- TIP 4: Have

[SQL] Add constraint for number of chars

2007-04-25 Thread PostgreSQL Admin
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

Re: [SQL] Add Constraint

2000-10-26 Thread Stephan Szabo
On Wed, 25 Oct 2000, Sivagami . wrote: > Hi all, > > I am a newbie to Postgresql, but I am familiar with SQL. I am trying to add a >constraint to my table using the ALTER TABLE command. The command goes like this : > > ALTER TABLE USER_SIGNUP ADD CONSTRAINT > P_USER_SIGNUP_USER_ID PRIMARY KEY

[SQL] Add Constraint

2000-10-25 Thread Sivagami .
Hi all,   I am a newbie to Postgresql, but I am familiar with SQL. I am trying to add a constraint to my table using the ALTER TABLE command. The command goes like this :   ALTER TABLE USER_SIGNUP ADD CONSTRAINTP_USER_SIGNUP_USER_ID PRIMARY KEY(user_id);   But it is returning the error ERROR