Re: [pgsql-performance] Large databases, performance

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [pgsql-performance] Large databases, performance
Дата
Msg-id 19697.1034170370@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Large databases, performance  (Manfred Koizar <mkoi-pg@aon.at>)
Ответы Re: [pgsql-performance] Large databases, performance  ("Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>)
problem with the Index  ("Jose Antonio Leo" <jaleo8@storelandia.com>)
Re: [pgsql-performance] Large databases, performance  (Manfred Koizar <mkoi-pg@aon.at>)
Список pgsql-general
Manfred Koizar <mkoi-pg@aon.at> writes:
> here is an implementation of a set of user types: char3, char4,
> char10.

Coupla quick comments on these:

> CREATE FUNCTION charNN_lt(charNN, charNN)
>     RETURNS boolean
>     AS '$libdir/fixchar'
>     LANGUAGE 'c';

> bool
> charNN_lt(char *a, char *b)
> {
>     return (strncmp(a, b, NN) < 0);
> }/*charNN_lt*/

These functions are dangerous as written, because they will crash on
null inputs.  I'd suggest marking them strict in the function
declarations.  Some attention to volatility declarations (isCachable
or isImmutable) would be a good idea too.

Also, it'd be faster and more portable to write the functions with
version-1 calling conventions.

Using the Makefile to auto-create the differently sized versions is
a slick trick...

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: "Shridhar Daithankar"
Дата:
Сообщение: Re: How to find out about index
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Installing PL/Python (progress!)