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

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Tom Lane" <tgl(at)postgresql(dot)org>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Fix up text concatenation so that it accepts all the reasonable
Date: 2007-09-17 11:18:39
Message-ID: 87ps0ho7zk.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers


"Tom Lane" <tgl(at)postgresql(dot)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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Gregory Stark 2007-09-17 11:28:34 Re: pgsql: Fix a portability bug (ye olde not casting a <ctype.h> argument
Previous Message User Cunha17 2007-09-17 02:06:19 snapshot - src: Initial release of the support on Sybase, ODBC and

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2007-09-17 11:28:34 Re: pgsql: Fix a portability bug (ye olde not casting a <ctype.h> argument
Previous Message Gregory Stark 2007-09-17 11:09:30 Small Release Notes Comment