> -----Oorspronkelijk bericht----- > Van: H.J. Sanders [mailto:hjs@xxxxxxx] > Verzonden: vrijdag 8 december 2006 16:33 > Aan: Raymond O'Donnell > Onderwerp: RE: [GENERAL] Male/female > > > Hi ray. > > We have done it with a integer whereby > > 0 = woman > 1 = man > > also self-documenting :-) > > Henk Sanders > > > > > -----Oorspronkelijk bericht----- > > Van: pgsql-general-owner@xxxxxxxxxxxxxx > > [mailto:pgsql-general-owner@xxxxxxxxxxxxxx]Namens Raymond O'Donnell > > Verzonden: vrijdag 8 december 2006 16:23 > > Aan: pgsql-general@xxxxxxxxxxxxxx > > Onderwerp: [GENERAL] Male/female > > > > > > Just wondering.....how do list member represent gender when storing > > details of people in a database? > > > > I've done it two ways: > > > > * A bool column, with the understanding that true/false represents > > one gender or the other. > > > > * Create a domain, something like: > > CREATE DOMAIN gender_domain > > AS character varying(7) > > NOT NULL > > CONSTRAINT gender_domain_check CHECK ((((VALUE)::text = > > 'male'::text) OR ((VALUE)::text = 'Female'::text))) > > > > I personally prefer the second, as it's self-documenting...is there > > any other/better way of doing it? > > > > --Ray. > > > > > > ---------------------------------------------------------------------- > > > > Raymond O'Donnell > > Director of Music, Galway Cathedral, Galway, Ireland > > rod@xxxxxx > > ---------------------------------------------------------------------- > > > > > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 3: Have you checked our extensive FAQ? > > > > http://www.postgresql.org/docs/faq > >