Re: [COMMITTERS] pgsql: Fix up text concatenation so that it accepts all the reasonable - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: [COMMITTERS] pgsql: Fix up text concatenation so that it accepts all the reasonable
Date
Msg-id 87ps0ho7zk.fsf@oxford.xeocode.com
Whole thread Raw
Responses Re: [COMMITTERS] pgsql: Fix up text concatenation so that it accepts all the reasonable
List pgsql-hackers
"Tom Lane" <tgl@postgresql.org> writes:

> Log Message:
> -----------
> Fix up text concatenation so that it accepts all the reasonable cases that
> were accepted by prior Postgres releases.  This takes care of the loose end
> left by the preceding patch to downgrade implicit casts-to-text.  To avoid
> breaking desirable behavior for array concatenation, introduce a new
> polymorphic pseudo-type "anynonarray" --- the added concatenation operators
> are actually text || anynonarray and anynonarray || text.

Just a crazy thought -- probably not worth doing now or perhaps ever -- but I
thought I would get it down in bits:

The above change eliminated cast functions to and from text by using the text
i/o functions. We could do the same for casts to and from bytea using binary
i/o functions.

I'm not sure how important it is for users to be able to reliably store any
data type in a bytea -- certainly not as important as being able to reliably
cast to and from text. 

Perhaps if you're doing some form of replication between different
architectures you might want to use binary representation for your transfers.
Or if you're doing something in a PL language like compressing or bundling up
multiple data in a container format or something.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Gregory Stark
Date:
Subject: Small Release Notes Comment
Next
From: Markus Schiltknecht
Date:
Subject: Re: [COMMITTERS] pgsql: Fix up text concatenation so that it accepts all the reasonable