Re: Custom type, operators and operator class not sorting/indexing correctly
Вложения
В списке pgsql-general по дате отправления:
| От | Martijn van Oosterhout |
|---|---|
| Тема | Re: Custom type, operators and operator class not sorting/indexing correctly |
| Дата | |
| Msg-id | 20090121195219.GA31050@svana.org обсуждение исходный текст |
| Ответ на | Re: Custom type, operators and operator class not sorting/indexing correctly (Roger Leigh <rleigh@codelibre.net>) |
| Ответы |
Re: Custom type, operators and operator class not
sorting/indexing correctly
|
| Список | pgsql-general |
On Wed, Jan 21, 2009 at 10:48:09AM +0000, Roger Leigh wrote: > Ah, thanks for the clarification. So I need to use CREATE TYPE > rather than CREATE DOMAIN. Because I'm essentially just storing > a text string with different operators, can I derive a type from > TEXT (perhaps by reusing the same input, output, receive and send > functions as TEXT?) I saw the textsend and textreceive functions, > which I assume are the appropriate functions for send and receive? > Are there any for input and output which I may reuse? Yes, you can copy all the existing attributes. Use: select * from pg_type where typname='text'; To get the relevent info (upcoming 8.4 will have CREATE TYPE xxx (LIKE=text) ). Lookup the citext project for an example. Have a nice day, -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > Please line up in a tree and maintain the heap invariant while > boarding. Thank you for flying nlogn airlines.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера