in Historical

joseph scotts blog raquo the metadata problem with databases

Joseph Scott’s Blog » The Metadata Problem With Databases:

"CREATE FUNCTION metadata_regex(varchar)
RETURNS varchar AS '
  SELECT regex
  FROM metadata
  WHERE column_name = $1;
' LANGUAGE SQL;
ALTER TABLE users ADD CONSTRAINT
username_ck CHECK (
  username ~ metadata_regex('username')
);
"

                    <p>
                      (Via <a href="http://joseph.randomnetworks.com/">Joseph Scott's Blog</a>.)
                    </p> - Intersting DB field metadata post