Skip site navigation (1) Skip section navigation (2)

Re: enums

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: tshipley(at)deru(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: enums
Date: 2005-10-28 01:05:40
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

Trent Shipley wrote:

>An enumeration is just a computer science short-hand way to define a set and a 
>"native" collation for the set. 
>An enumeration's native collation need not be the only, or even the most 
>common, collation for the enumerated set of symbols.

No it's not. Many languages define enumerated types as having a fixed 
ordering. It is not just a set. That is the sense in which I am using 
the term. And, after all, you can always write a function that gives you 
an alternative ordering. All we are building in is an ordering based in 
the enumeration order, which you are at perfect liberty not to use. 
Postgres lets you define an alternative operator class for any type, so 
we are very flexible. People are getting way too hung up over this.



In response to

  • Re: enums at 2005-10-28 00:23:02 from Trent Shipley


  • Re: enums at 2005-10-28 01:35:41 from Cristian Prieto

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2005-10-28 01:12:15
Subject: relfilenode
Previous:From: Grzegorz JaskiewiczDate: 2005-10-28 00:55:58
Subject: SOLVED Re: _penalty gist method invoked with one key NULL

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group