Re: VARIANT / ANYTYPE datatype

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Darren Duncan <darren(at)darrenduncan(dot)net>, Merlin Moncure <mmoncure(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: VARIANT / ANYTYPE datatype
Date: 2011-05-10 20:31:39
Message-ID: 1305059443-sup-7969@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Excerpts from Bruce Momjian's message of mar may 10 16:21:36 -0400 2011:
> Darren Duncan wrote:
> > To follow-up, an additional feature that would be useful and resembles union
> > types is the variant where you could declare a union type first and then
> > separately other types could declare they are a member of the union. I'm
> > talking about loosely what mixins or type-roles or interfaces etc are in other
> > languages. The most trivial example would be declaring an ENUM-alike first and
> > then separately declaring the component values where the latter declare they are
> > part of the ENUM, and this could make it easier to add or change ENUM values.
> > But keep in mind that this is a distinct concept from what we're otherwise
> > talking about as being union types. -- Darren Duncan
>
> Should this be a TODO item?

The general idea of C-style unions, sure. Mixin-style stuff ... not sure.
Seems like it'd be pretty painful.

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Darren Duncan 2011-05-10 21:19:32 Re: VARIANT / ANYTYPE datatype
Previous Message Bruce Momjian 2011-05-10 20:21:36 Re: VARIANT / ANYTYPE datatype