[GENERAL] Concerned to discover DOMAINs can be the same as built in types with no escaping

2016-06-23 Thread Justin Dearing
arning. CREATE DOMAIN public.int CHAR(50); -- Does work. I could see the argument for it working, but would prefer it didn't work. Should still emit a warning its overriding a base Since I'm returning to postgres after close to a decade, I figured I'd ask here for feedback before posting to the hackers list. Regards, Justin Dearing

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

2007-03-31 Thread Justin Dearing
N profile_color SET DEFAULT '#RFF'; This worked fine and I didn't notice it until I added arecord to the users table and got the error: ERROR: value too long for type character(7). This behavior seems undesirable to me. Is this a known bug or is there a reason for

[GENERAL] custom type for storing a HTML color

2007-03-27 Thread Justin Dearing
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 o

[GENERAL] Syncing postgres data with Pocket PC

2007-02-19 Thread Justin Dearing
Hello, I need a way to sync a postgres view with a table on a Windows CE device. The table will be read only on the mobile device. I am seeking to replace an access database that syncs a table with a pocket pc table via active sync. I would really like to use postgres for the desktop side of thin