Re: [HACKERS] type coerce problem with lztext - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] type coerce problem with lztext
Date
Msg-id 16100.951677911@sss.pgh.pa.us
Whole thread Raw
In response to type coerce problem with lztext  (wieck@debis.com (Jan Wieck))
Responses Re: [HACKERS] type coerce problem with lztext
Re: [HACKERS] type coerce problem with lztext
List pgsql-hackers
wieck@debis.com (Jan Wieck) writes:
>     There are functions text(lztext) and  lztext(text)  too,  but
>     the  system  is  unable  to  find an operator if one compares
>     text=lztext in a query. IIRC, creating a  function  named  as
>     the target type and taking the source type is what made auto-
>     type-conversion work - so what am I missing here?

Yup, TypeCategory was the missing ingredient.  Seems to work now.

>     Yes, the 3043 bytes long rule action string got stored in 855
>     bytes  in  pg_rewrite.  That's 71.9% compression rate on this
>     attempt!

Over all the rules in the regression test database, I see:

regression=# select sum(length(ev_action)),sum(octet_length(ev_action)) from pg
_rewrite; sum   |  sum
--------+-------105270 | 38091
(1 row)

or about 64% compression.  Not bad...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Don Baccus
Date:
Subject: Re: [HACKERS] ALTER TABLE DROP COLUMN
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] type coerce problem with lztext