Re: pg_class catalog question...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
Cc: "Thomas Hallgren" <thomas(at)tada(dot)se>, "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>, "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_class catalog question...
Date: 2006-04-02 22:13:43
Message-ID: 25327.1144016023@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Jonah H. Harris" <jonah(dot)harris(at)gmail(dot)com> writes:
> On 4/2/06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> If you're expecting that you'll be able to write BYTEA(n) and avoid
>> storing a length word, you'll find that it's not a trivial matter.

> It may not be trivial, but it's certainly not impossible.

A word to the wise is sufficient: function result types don't have
known typmods, and for the most part expression results don't either.
Changing that is not "impossible", but the level of pain vastly exceeds
what this feature would be worth. And that's not even the only
problem.

If you're desperate to have something like this, you could create one
or more fixed-size datatypes (ie, with various positive typlen values).
But I don't see a practical way to use a typmod in determining the
physical width.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-04-02 22:23:24 Re: semaphore usage "port based"?
Previous Message Jonah H. Harris 2006-04-02 21:13:55 Re: pg_class catalog question...