> -----Original Message-----
> From: pgadmin(at)claymccoy(dot)com [mailto:pgadmin(at)claymccoy(dot)com]
> Sent: 27 October 2003 04:17
> To: chriskl(at)familyhealth(dot)com(dot)au
> Cc: pgadmin-support(at)postgresql(dot)org
> 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.
pgadmin-support by date
|Next:||From: Jean-Michel POURE||Date: 2003-10-27 09:44:31|
|Subject: Re: dump and restore in pgadmin|
|Previous:||From: Együd Csaba||Date: 2003-10-27 05:55:37|
|Subject: Re: Problems using PGAdmin III|