Re: [HACKERS] type coerce problem with lztext

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jan Wieck <wieck(at)debis(dot)com>
Cc: PostgreSQL HACKERS <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] type coerce problem with lztext
Date: 2000-02-27 18:58:31
Message-ID: 16100.951677911@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

wieck(at)debis(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2000-02-27 19:06:21 Re: [HACKERS] type coerce problem with lztext
Previous Message Don Baccus 2000-02-27 18:17:52 Re: [HACKERS] ALTER TABLE DROP COLUMN