| From: | "David E(dot) Wheeler" <david(at)kineticode(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Ryan Bradetich <rbradetich(at)gmail(dot)com>, pgsql-hackers Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: [Review] Tests citext casts by David Wheeler. |
| Date: | 2008-09-12 16:50:25 |
| Message-ID: | 72D8E09D-1906-4AB9-8157-C20C11981E63@kineticode.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Sep 5, 2008, at 11:33, David E. Wheeler wrote:
> On Sep 5, 2008, at 11:30, Tom Lane wrote:
>
>> Thanks for reviewing. I've committed this with your suggestions and
>> one additional non-cosmetic change: schema-qualify names in the
>> bodies of the SQL functions so that they are not search_path
>> dependent.
>
> Thanks, I'll check that out.
Finally got to this; sorry for the delay.
Two things I noticed:
1. Did I neglect to include the documentation patch? I've attached it
here. It's necessary because of the addition of the new functions.
2. Many thanks for switching to using the network_show function
instead of the SQL-based casting I had. Can you tell me how to go
about finding such functions? Because for my 8.3 version of citext, I
have a whole bunch of functions that do casting like this:
CREATE OR REPLACE FUNCTION int8(citext)
RETURNS int8
AS 'SELECT int8( $1::text )'
LANGUAGE SQL IMMUTABLE STRICT;
CREATE OR REPLACE FUNCTION citext(int8)
RETURNS citext
AS 'SELECT text( $1 )::citext'
LANGUAGE SQL IMMUTABLE STRICT;
CREATE OR REPLACE FUNCTION int4(citext)
RETURNS int4
AS 'SELECT int4( $1::text )'
LANGUAGE SQL IMMUTABLE STRICT;
CREATE OR REPLACE FUNCTION citext(int4)
RETURNS citext
AS 'SELECT text( $1 )::citext'
LANGUAGE SQL IMMUTABLE STRICT;
...and so on. I'd love to be able to replace these (and many others)
with internal C functions, if only I could figure out what those
functions were. A pointer to making that determination (if they even
exist in 8.3) would be greatly appreciated.
Thanks,
David
| Attachment | Content-Type | Size |
|---|---|---|
| citext_doc.patch | application/octet-stream | 3.9 KB |
| unknown_filename | text/plain | 1 byte |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2008-09-12 17:14:36 | Re: [patch] fix dblink security hole |
| Previous Message | Andrew Chernow | 2008-09-12 16:48:31 | Re: Better auth errors from libpq |