Re: FW: [GENERAL] Male/female

2006-12-11 Thread Karsten Hilbert
On Mon, Dec 11, 2006 at 01:34:17PM +0100, H.J. Sanders wrote:

> > I would also suggest using a *coded* gender, not "male",
> > "female" strings which will make gender-based calculations a
> > lot easier down the road.
> 
> Which will also make it easier to have a "multi-langual" solution.
Which, precisely, is one of the reason GNUmed does it that
way. We then have a table gender_label which can translate
the code into a string (both English as a base language and
a local language via "select _(label) from gender_label".

(Yes, we sort of re-implemented gettext in SQL ;-)

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

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


Re: FW: [GENERAL] Male/female

2006-12-11 Thread H.J. Sanders

> 
> I would also suggest using a *coded* gender, not "male",
> "female" strings which will make gender-based calculations a
> lot easier down the road.

Which will also make it easier to have a "multi-langual" solution.

Henk Sanders




---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


Re: FW: [GENERAL] Male/female

2006-12-11 Thread Karsten Hilbert
On Fri, Dec 08, 2006 at 04:50:16PM +0100, Alban Hertroys wrote:

> Why not use unicode symbols 0x2640 and 0x2642?
A clever idea, however, it does not cover

transsexual, female phenotype
transsexual, male phenotype
hermaphrodite, intersexual phenotype

which we (GNUmed, that is) need to support in a medical
database.

In fact, most (all?) of the approaches I have seen in this
thread lack that. Using bool would even preclude extension
of the constraint in that direction if it were ever needed.
So, one is better of with, say, char(2) or something
similar.

I would also suggest using a *coded* gender, not "male",
"female" strings which will make gender-based calculations a
lot easier down the road.

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org/


Re: FW: [GENERAL] Male/female

2006-12-08 Thread Harald Armin Massa

> > 0 = woman
> > 1 = man
This gave me my first good laugh of the day... I will never accuse DBAs of not 
having a sense of> humor albeit unique!


Richard,

gmail extended my laugh with the sponsored links:

How To Be A woman
How To Be The Girl That Every Man Secretly Wishes He Was Married To!
Relationship-Advice.com

PostgreSQL Replication
Stable, fast and native replication for PostgreSQL 8.0 and 8.1
www.commandprompt.com/

PostgreSQL GUI admin tool
Manage, Sync, Backup, Schedule Task Import/ Export, Report, Download!
pgsql.navicat.com


Now we just need fast, stable and native replication for " The Girl
That Every Man Secretly Wishes He Was Married To!"


Harald

--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Reinsburgstraße 202b
70197 Stuttgart
0173/9409607
-
Python: the only language with more web frameworks than keywords.

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
  choose an index scan if your joining column's datatypes do not
  match


Re: FW: [GENERAL] Male/female

2006-12-08 Thread Richard Broersma Jr
> > > Just wondering.how do list members 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.
[snip]
> > We have done it with a integer whereby 
> > 
> > 0 = woman
> > 1 = man
> > 
> > also self-documenting   :-)
[snip]
This gave me my first good laugh of the day... I will never accuse DBAs of not 
having a sense of
humor albeit unique!

Regards,

Richard Broersma Jr.  

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


Re: FW: [GENERAL] Male/female

2006-12-08 Thread Alban Hertroys
H.J. Sanders wrote:
>> We have done it with a integer whereby 
>>
>> 0 = woman
>> 1 = man
>>
>> also self-documenting   :-)

Why not use unicode symbols 0x2640 and 0x2642?

-- 
Alban Hertroys
[EMAIL PROTECTED]

magproductions b.v.

T: ++31(0)534346874
F: ++31(0)534346876
M:
I: www.magproductions.nl
A: Postbus 416
   7500 AK Enschede

// Integrate Your World //

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


FW: [GENERAL] Male/female

2006-12-08 Thread H.J. Sanders


> -Oorspronkelijk bericht-
> Van: H.J. Sanders [mailto:[EMAIL PROTECTED]
> 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: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] Raymond O'Donnell
> > Verzonden: vrijdag 8 december 2006 16:23
> > Aan: pgsql-general@postgresql.org
> > 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
> > [EMAIL PROTECTED]
> > --
> > 
> > 
> > 
> > ---(end of broadcast)---
> > TIP 3: Have you checked our extensive FAQ?
> > 
> >http://www.postgresql.org/docs/faq
> > 

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match