| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | pgsql-patches(at)postgreSQL(dot)org |
| Subject: | WIP patch for text coercions |
| Date: | 2007-06-04 02:33:24 |
| Message-ID: | 936.1180924404@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-patches |
The attached patch extends Peter's proposed patch to upgrade most implicit
casts-to-text to be assignment casts:
http://archives.postgresql.org/pgsql-hackers/2007-04/msg00017.php
with the other stuff discussed subsequently in that thread, namely
creating a generalized facility to support casts to and from text (and
varchar and bpchar) via the basic I/O functions of other types.
This adds one expression node type ("CoerceViaIO") but allows elimination
of a veritable boatload of duplicative per-datatype text conversion
functions, plus it works for types that never had such functions.
I have not touched the documentation yet. Also I just noticed that
contrib/cube and contrib/isn create text casts that could be dispensed
with. I think the patch is complete otherwise.
Another point that needs to be dealt with is the infelicity discussed
here:
http://archives.postgresql.org/pgsql-hackers/2007-02/msg01729.php
We had pretty much agreed that we could handle that by restricting the
conditions under which we'd consider coercing an UNKNOWN literal to
ANYARRAY, but it wasn't quite clear *what* restriction to use.
Comments?
regards, tom lane
| Attachment | Content-Type | Size |
|---|---|---|
| text-casts-2.patch.gz | application/octet-stream | 23.1 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Heikki Linnakangas | 2007-06-04 08:44:35 | Re: Synchronized Scan WIP patch |
| Previous Message | Tom Lane | 2007-06-03 17:42:07 | Re: GUC temp_tablespaces (updated) |