Re: [HACKERS] type coerce problem with lztext

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] type coerce problem with lztext
Дата
Msg-id 16100.951677911@sss.pgh.pa.us
обсуждение исходный текст
Ответ на type coerce problem with lztext  (wieck@debis.com (Jan Wieck))
Ответы Re: [HACKERS] type coerce problem with lztext  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: [HACKERS] type coerce problem with lztext  (wieck@debis.com (Jan Wieck))
Список 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 по дате отправления:

Предыдущее
От: Don Baccus
Дата:
Сообщение: Re: [HACKERS] ALTER TABLE DROP COLUMN
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] type coerce problem with lztext