Re: Designing an extension for feature-space similarity search

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Designing an extension for feature-space similarity search
Дата
Msg-id 14004.1329420874@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Designing an extension for feature-space similarity search  (Jay Levitt <jay.levitt@gmail.com>)
Список pgsql-hackers
Jay Levitt <jay.levitt@gmail.com> writes:
> Perfect. Composite types are exactly what I need here; the application can 
> declare its composite type and provide distance functions for each member, 
> and the extension can use those to calculate similarity. How do I introspect 
> the composite type's pg_class to see what it contains? I assume there's a 
> better way than SPI on system catalogs :)

Definitely.  Take a look at record_out, record_cmp, and sibling
functions on generic composites (src/backend/utils/adt/rowtypes.c).
You might or might not feel like wiring in more assumptions than those
have about the possible contents of the record type.
        regards, tom lane


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

Предыдущее
От: Dimitri Fontaine
Дата:
Сообщение: Re: [trivial patch] typo in doc/src/sgml/sepgsql.sgml
Следующее
От: Marti Raudsepp
Дата:
Сообщение: Re: possible new option for wal_sync_method