Re: List of "binary-compatible" data types

From: Noah Misch <noah(at)leadboat(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: Thom Brown <thom(at)linux(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: List of "binary-compatible" data types
Date: 2013-11-05 03:22:09
Message-ID: 20131105032209.GA736962@tornado.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Nov 04, 2013 at 05:23:36PM -0800, Josh Berkus wrote:
> On 11/04/2013 05:21 PM, Josh Berkus wrote:
> > Thom,
> >
> >
> >> SELECT
> >> castsource::regtype::text,
> >> array_agg(casttarget::regtype order by casttarget::regtype::text) casttargets
> >> FROM pg_cast
> >> WHERE castmethod = 'b'
> >> GROUP BY 1
> >> ORDER BY 1;
> >
> > Are we actually covering 100% of these for ALTER COLUMN now?

Yes; ALTER TABLE ALTER TYPE refers to the same metadata as Thom's query. If
you add to the list by issuing CREATE CAST ... WITHOUT FUNCTION, ALTER TABLE
will respect that, too.

> Also, JSON <--> Text seems to be missing from the possible binary
> conversions. That's a TODO, I suppose.

Only json --> text, not json <-- text. Note that you can add the cast
manually if you have an immediate need.

--
Noah Misch
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2013-11-05 03:51:00 Re: [BUGS] BUG #8573: int4range memory consumption
Previous Message Craig Ringer 2013-11-05 01:46:33 Re: [v9.4] row level security