Re: User-defined typle similar to char(length) varchar(length)

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Teodor Sigaev <teodor(at)sigaev(dot)ru>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: User-defined typle similar to char(length) varchar(length)
Date: 2006-08-04 14:27:12
Message-ID: 20060804142712.GI2478@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Aug 03, 2006 at 05:37:21PM -0700, elein wrote:
> I can think of histograms as a data type which may take more than one argument,
> maybe even an array for boundary information. I think the direction *in the
> long term* should be to allow multiple arguments (as a ROW type?) and other
> base or complex types as arguments. The value would be a type itself and
> the datatype must do the right thing regarding it. This may not be practical
> for short-term, but would open up initialization parameters for user-defined
> typed.

Two problems:

1. The storage of the type cannot be affected by the typmod, because
you're not going to always have it available.
2. It's got to be a single integer (int4 I think)

So histograms would have to store the bounds some other way anyway...

I think multiple arguments would be cool but we have to keep in mind
the limitations of typmod.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-08-04 14:32:27 Re: User-defined typle similar to char(length) varchar(length)
Previous Message Tom Lane 2006-08-04 14:23:31 Re: ecpg test suite