Re: datatype advice numeric vs. varchar

Поиск
Список
Период
Сортировка
Искать
От
Tino Wildenhain
Тема
Re: datatype advice numeric vs. varchar
Дата
Msg-id
45AF1CC1.7070009@wildenhain.de
Ответ на
Список
Дерево обсуждения
datatype advice numeric vs. varchar Gene <genekhart@gmail.com>
Re: datatype advice numeric vs. varchar Martijn van Oosterhout <kleptog@svana.org>
Re: datatype advice numeric vs. varchar Gene <genekhart@gmail.com>
Re: datatype advice numeric vs. varchar "shakahshakah@gmail.com" <shakahshakah@gmail.com>
Re: datatype advice numeric vs. varchar Tino Wildenhain <tino@wildenhain.de>
Re: datatype advice numeric vs. varchar Michael Glaesemann <grzm@seespotcode.net>
Re: datatype advice numeric vs. varchar Ron Johnson <ron.l.johnson@cox.net>
Gene schrieb:
> you're probably right, actually using LIKE with numeric works fine but
> of course i will have to contend with things like truncating zeros to
> the left etc... are there any advantages to using ascii encoding as
> far as performance of LIKE, REGEXES, INDEXES etc versus using UTF8?

Well if you are really concerned, write a custom datatype where you
store 2 digits of the telephone number in one byte. A nibble for
0-9+-/ und " " should be plenty (you would even have a c-like
string end marker :-) Of course you would need to write operators
for everything you want to do w/ it. IIRC, there were even plans
I read on the list to write such a datatype. Maybe you scan the
list archives first.

Regards
Tino
В списке pgsql-general по дате отправления
От: Darmawan Sugiarto
Дата:
Сообщение: libpq/libpq-fs.h
От: Tom Lane
Дата:
Сообщение: Re: Index bloat of 4x
FAQ