> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: 27 October 2003 04:17
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: [pgadmin-support] Re: How to use the SET data type?  
> Help plz!
> 
> Odd that it is a selectable datatype in pgadmin then huh?

It's selectable because it's in pg_type. pgAdmin make as few assumptions about the 
backend as possible - and datatypes is no different. If it were not done this way then 
you would not be able to use custom types or domains. As for what it's actually there 
for, I have no idea. Hangover from Berkeley perhaps?

> If there are no sets, then is there anythign else that can be 
> used to represent that type of data.  I used them a lot in a 
> mySQL database that I am migrating from.  It is very useful 
> to have a predefined set of values to choose from, otherwise 
> it would just be a text field with no constraints as to the 
> contents.  It is also nice to have the popup menus of the 
> selecable values when inputing data like how phpmyadmin 
> handles sets. It seem slike a huge oversight to not support them.

It's not an oversight, it's a non-spec compliant workaround dreamt up by someone in 
the MySQL team because they don't support constraints.

The correct way to do what you require is to add check constraints to the table to 
make sure that the value entered is within the allowed values. If you use the same 
'set' a lot, then consider creating a domain which you can then use in your table 
definitions.

Regards, Dave.

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to