Re: [GENERAL] Default value of column not respecting character length or domain restraints.

2007-03-31 Thread Tom Lane
"Justin Dearing" <[EMAIL PROTECTED]> writes: > It seems I can feed a default value to a domain that won't fit in the > underlying base type. I have the domain html_colors as so: > CREATE DOMAIN html_color AS char(7) CHECK (VALUE ~ '^#[A-Fa-f0-9]{6}$'); > I then defined a column of html_colors as

[GENERAL] Default value of column not respecting character length or domain restraints.

2007-03-31 Thread Justin Dearing
It seems I can feed a default value to a domain that won't fit in the underlying base type. I have the domain html_colors as so: CREATE DOMAIN html_color AS char(7) CHECK (VALUE ~ '^#[A-Fa-f0-9]{6}$'); I then defined a column of html_colors as so: ALTER TABLE users ALTER COLUMN profile_color SET