Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id DCC8E632F9F for ; Wed, 15 Apr 2009 09:57:17 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 46430-02 for ; Wed, 15 Apr 2009 09:57:16 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from titania.wxnz.net (titania.wxnz.net [58.28.4.13]) by mail.postgresql.org (Postfix) with ESMTP id 98D486326A8 for ; Wed, 15 Apr 2009 09:57:16 -0300 (ADT) Received: from gonzo (ip-118-90-131-169.xdsl.xnet.co.nz [118.90.131.169]) by titania.wxnz.net (Postfix) with ESMTP id E23E11098160 for ; Thu, 16 Apr 2009 00:57:12 +1200 (NZST) Received: from news by gonzo with local (Exim 4.69) (envelope-from ) id 1Lu4g4-0004hL-E6 for pgsql-sql@postgresql.org; Thu, 16 Apr 2009 00:57:20 +1200 To: pgsql-sql@postgresql.org Path: not-for-mail From: Jasen Betts Newsgroups: gmane.comp.db.postgresql.sql Subject: Re: ENUM vs DOMAIN vs FKyed loookup table Date: 15 Apr 2009 12:57:20 GMT Organization: Dis (not Dat) Organisation Lines: 11 Message-ID: References: <49DCDA27.4090901@megafon.hr> <5d0f60990904121108y7f5dbb7aydf2105b68bceab12@mail.gmail.com> NNTP-Posting-Host: localhost Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: reversiblemaps.ath.cx 1239800240 18061 127.0.0.1 (15 Apr 2009 12:57:20 GMT) X-Face: ?)Aw4rXwN5u0~$nqKj`xPz>xHCwgi^q+^?Ri*+R(&uv2=E1Q0Zk(>h!~o2ID@6{uf8s; a +M[5[U[QT7xFN%^gR"=tuJw%TXXR'Fp~W; (T"1(739R%m0Yyyv*gkGoPA.$b,D.w:z+<'"=-lVT?6 {T?=R^:W5g|E2#EhjKCa+nt":4b}dU7GYB*HBxn&Td$@f%.kl^:7X8rQWd[NTc"P"u6nkisze/Q; 8 "9Z{peQF,w)7UjV$c|RO/mQW/NMgWfr5*$-Z%u46"/00mx-,\R'fLPe.)^ User-Agent: slrn/pre1.0.0-2 (Linux) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200904/78 X-Sequence-Number: 32424 On 2009-04-12, Dirk Jagdmann wrote: >> When you need to choose between enum types, domain types or lookup tables >> with foreign keys, what do you usualy choose? > > When I have a column with valid values that I know when writing my > tables and that will *never* change I use an enum. For example a human > gender type (and remember that there are 4 values for human sex if you > want to model it completely). "lambda moo" has even more genders than that.