Re: Question about casts - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Question about casts
Date
Msg-id 20448.1147983416@sss.pgh.pa.us
Whole thread Raw
In response to Re: Question about casts  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-hackers
Martijn van Oosterhout <kleptog@svana.org> writes:
> Every cast costs space and lookup time.

Actually, we could probably have a net time savings here if the text
cast cases were hard-wired into parse_coerce.c.  The reason is that
about 10% of the default entries in pg_cast are "retail" implementations
of text-to-or-from-foo casts, and we could get rid of all those entries,
not to mention the associated pg_proc entries and underlying code.
That would certainly cut search time in pg_cast enough to pay for a
couple of hard-wired "typoid == TEXTOID" checks.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Michael Paesold
Date:
Subject: Re: [OT] MySQL is bad, but THIS bad?
Next
From: "Jim C. Nasby"
Date:
Subject: Re: Compression and on-disk sorting