Re: Information about columns - Mailing list pgsql-general

From Tom Lane
Subject Re: Information about columns
Date
Msg-id 14305.1245767783@sss.pgh.pa.us
Whole thread Raw
In response to Re: Information about columns  (Dario Teixeira <darioteixeira@yahoo.com>)
List pgsql-general
Dario Teixeira <darioteixeira@yahoo.com> writes:
> I doubt there is a clean way around this (barring Postgresql implementing
> option types).  Therefore, I'm working on a workaround that involves the
> Postgresql side annotating the nullability of type definitions by issuing
> comments on the type (using COMMENT ON).  Yes, it is a hack, but will solve
> my problem as long as I can determine the return type (and thus fetch its
> comment) associated with a query.

Okay, but that has nothing to do with either functions or composite
types.

The reasonable way to handle this in Postgres (IMHO) would be to define
not-null domains over the types you care about, and then lobby us to
have RowDescription return domain OIDs instead of smashing domains to
their base types.  I don't recall the exact reasoning for the domain
smashing behavior; perhaps it could be made adjustable.

            regards, tom lane

pgsql-general by date:

Previous
From: Ivan Sergio Borgonovo
Date:
Subject: drawback of array vs join
Next
From: Greg Stark
Date:
Subject: Re: after vacuum analyze, explain still wrong