Re: PATCH: CITEXT 2.0 v3

From: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PATCH: CITEXT 2.0 v3
Date: 2008-07-16 00:45:00
Message-ID: 34A73036-34A1-4C19-B447-F1752F3F3129@kineticode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Jul 15, 2008, at 12:56, Tom Lane wrote:

> Don't run the tests in a read-only directory, perhaps.

Yes, I changed the owner to the postgres system user and that did the
trick.

>
>> Or do they matter for sanity-checking citext?
>
> Hard to tell --- I'd suggest trying to get a clean run. As for what
> you
> have, the first diff hunk suggests you've got the wrong function
> properties for citextsend/citextrecv.

Here's the new diff:

*** ./expected/opr_sanity.out Mon Jul 14 21:55:49 2008
--- ./results/opr_sanity.out Tue Jul 15 17:41:03 2008
***************
*** 87,94 ****
p1.provolatile != p2.provolatile OR
p1.pronargs != p2.pronargs);
oid | proname | oid | proname
! -----+---------+-----+---------
! (0 rows)

-- Look for uses of different type OIDs in the argument/result type
fields
-- for different aliases of the same built-in function.
--- 87,96 ----
p1.provolatile != p2.provolatile OR
p1.pronargs != p2.pronargs);
oid | proname | oid | proname
! ------+----------+-------+------------
! 2414 | textrecv | 87258 | citextrecv
! 2415 | textsend | 87259 | citextsend
! (2 rows)

-- Look for uses of different type OIDs in the argument/result type
fields
-- for different aliases of the same built-in function.
***************
*** 110,117 ****
prorettype | prorettype
------------+------------
25 | 1043
1114 | 1184
! (2 rows)

SELECT DISTINCT p1.proargtypes[0], p2.proargtypes[0]
FROM pg_proc AS p1, pg_proc AS p2
--- 112,120 ----
prorettype | prorettype
------------+------------
25 | 1043
+ 25 | 87255
1114 | 1184
! (3 rows)

SELECT DISTINCT p1.proargtypes[0], p2.proargtypes[0]
FROM pg_proc AS p1, pg_proc AS p2
***************
*** 124,133 ****
-------------+-------------
25 | 1042
25 | 1043
1114 | 1184
1560 | 1562
2277 | 2283
! (5 rows)

SELECT DISTINCT p1.proargtypes[1], p2.proargtypes[1]
FROM pg_proc AS p1, pg_proc AS p2
--- 127,138 ----
-------------+-------------
25 | 1042
25 | 1043
+ 25 | 87255
+ 1042 | 87255
1114 | 1184
1560 | 1562
2277 | 2283
! (7 rows)

SELECT DISTINCT p1.proargtypes[1], p2.proargtypes[1]
FROM pg_proc AS p1, pg_proc AS p2
***************
*** 139,148 ****
proargtypes | proargtypes
-------------+-------------
23 | 28
1114 | 1184
1560 | 1562
2277 | 2283
! (4 rows)

SELECT DISTINCT p1.proargtypes[2], p2.proargtypes[2]
FROM pg_proc AS p1, pg_proc AS p2
--- 144,154 ----
proargtypes | proargtypes
-------------+-------------
23 | 28
+ 25 | 87255
1114 | 1184
1560 | 1562
2277 | 2283
! (5 rows)

SELECT DISTINCT p1.proargtypes[2], p2.proargtypes[2]
FROM pg_proc AS p1, pg_proc AS p2
***************
*** 305,311 ****
142 | 25 | 0 | a
142 | 1043 | 0 | a
142 | 1042 | 0 | a
! (6 rows)

-- **************** pg_operator ****************
-- Look for illegal values in pg_operator fields.
--- 311,318 ----
142 | 25 | 0 | a
142 | 1043 | 0 | a
142 | 1042 | 0 | a
! 87255 | 1042 | 0 | a
! (7 rows)

-- **************** pg_operator ****************
-- Look for illegal values in pg_operator fields.

======================================================================

So I guess my question is: what is wrong with the properties for
citextsend/citextrecv and what else might these failures be indicating
is wrong?

CREATE OR REPLACE FUNCTION citextrecv(internal)
RETURNS citext
AS 'textrecv'
LANGUAGE 'internal' IMMUTABLE STRICT;

CREATE OR REPLACE FUNCTION citextsend(citext)
RETURNS bytea
AS 'textsend'
LANGUAGE 'internal' IMMUTABLE STRICT;

CREATE TYPE citext (
INPUT = citextin,
OUTPUT = citextout,
RECEIVE = citextrecv,
SEND = citextsend,
INTERNALLENGTH = VARIABLE,
STORAGE = extended
);

Thanks,

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2008-07-16 01:20:59 Re: rfc: add pg_dump options to dump output
Previous Message Tatsuo Ishii 2008-07-16 00:37:25 Re: [PATCHES] WITH RECURSIVE updated to CVS TIP