Re: Bug and/or feature? Complex data types in tables...

From: Michael Glaesemann <grzm(at)myrealbox(dot)com>
To: "Chris Travers" <chris(at)travelamericas(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Bug and/or feature? Complex data types in tables...
Date: 2004-01-01 15:48:22
Message-ID: EDFFE6AC-3C71-11D8-A298-000A95C88220@myrealbox.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Dec 31, 2003, at 7:20 PM, Chris Travers wrote:

> This concept of using complex types in tables actually does have one
> legitimate use. When used with casts and functions, you could use it
> as a
> "poor-man's datatype" development method.
>
> Here is a hypothetical example. Imagine for a moment that there was
> no CIDR
> datatype. I could create a datatype as a set of ints and then create
> casting functions which I could use for display of the data. This
> would be
> similar to C except that it could be done by people like myself whose C
> coding skills are not up to the level where I or anyone else would
> want them
> in the database backend ;-)

This is a situation where PostgreSQL's CREATE DOMAIN, or CREATE TYPE
support would be useful, I think. Is there a reason these wouldn't work
as well as using a "table type"?

Happy New Year!
Michael Glaesemann
grzm myrealbox com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dennis Bjorklund 2004-01-01 16:12:25 Re: GetLastInsertID ?
Previous Message Stephane Pinel 2004-01-01 15:10:56 GetLastInsertID ?

Browse pgsql-hackers by date

  From Date Subject
Next Message ivan 2004-01-01 15:55:18 time format
Previous Message William ZHANG 2004-01-01 05:59:45 ecpg's minor bug