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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

custom type for storing a HTML color



Hello, I currently store html color codes in that database with the
following DOMAIN:

CREATE DOMAIN html_color AS char(7) CHECK (VALUE ~ '^#[A-Fa-f0-9]{6}$');

Has anyone created a custom type that has additional functionality (eg
format the input or output to other formats, retrieve red, green or
blue values as 0-255 integers, etc. This is good enough for my uses at
the moment, but has anyone invented a better wheel than mine?



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group